Class ImageFactoryField

    • Constructor Detail

      • ImageFactoryField

        public ImageFactoryField​(FieldFactory factory,
                                 javax.swing.ImageIcon icon,
                                 ProxyObj proxy,
                                 java.awt.FontMetrics metrics,
                                 int x,
                                 int width)
        Constructor
        Parameters:
        factory - the FieldFactory that generated this field.
        icon - the ImageIcon to display.
        proxy - the object that this field represents.
        metrics - the FontMetrics used to render.
        x - the starting x position for this field.
        width - the width of this field.
      • ImageFactoryField

        public ImageFactoryField​(FieldFactory factory,
                                 javax.swing.ImageIcon icon,
                                 ProxyObj proxy,
                                 java.awt.FontMetrics metrics,
                                 int x,
                                 int width,
                                 boolean center)
        Constructor
        Parameters:
        factory - the FieldFactory that generated this field.
        icon - the ImageIcon to display.
        proxy - the object that this field represents.
        metrics - the FontMetrics used to render.
        x - the starting x position for this field.
        width - the width of this field.
        center - centers the image if true.
    • Method Detail

      • getFieldFactory

        public FieldFactory getFieldFactory()
        Returns the FieldFactory that generated this Field.
        Specified by:
        getFieldFactory in interface ListingField
        Returns:
        the FieldFactory that generated this Field
      • getFieldModel

        public FieldFormatModel getFieldModel()
        Returns the model that contains the FieldFactory that generated this Field.
        Specified by:
        getFieldModel in interface ListingField
        Returns:
        the fieldModel that has the FieldFactory that generated this field.
      • getProxy

        public ProxyObj getProxy()
        Returns the object that this field is associated with.
        Specified by:
        getProxy in interface ListingField
        Returns:
        the object that the fieldFactory used to generate the information in this field.
      • getClickedObject

        public java.lang.Object getClickedObject​(FieldLocation fieldLocation)
        Description copied from interface: ListingField
        Returns the object that was clicked on a Field for the given FieldLocation. This may be the field itself or a lower-level entity, such as a FieldElement.
        Specified by:
        getClickedObject in interface ListingField
        Parameters:
        fieldLocation - The location that was clicked.
        Returns:
        the object that was clicked
        See Also:
        ListingField.getClickedObject(FieldLocation)