Class ImagePanelFormField

java.lang.Object
ca.corbett.forms.fields.FormField
ca.corbett.extras.image.ImagePanelFormField

public class ImagePanelFormField extends FormField
Provides a FormField implementation for viewing/editing config options for ImagePanels.
Since:
2018-01-26
Author:
scorbett
  • Constructor Details

    • ImagePanelFormField

      public ImagePanelFormField(String label)
  • Method Details

    • isMultiLine

      public boolean isMultiLine()
      Description copied from class: FormField
      By default, FormFields occupy a single "line", or row, on the form. However, some FormFields may have a field component that spans multiple lines, like a multi-line text box, or a list, or a custom panel. Descendant classes can override the default false value here. It controls the placement of the field label. For tall form fields, the field label will be anchored to the top-left of its area.
      Overrides:
      isMultiLine in class FormField
    • setShouldExpand

      public ImagePanelFormField setShouldExpand(boolean should)
    • shouldExpand

      public boolean shouldExpand()
      Description copied from class: FormField
      By default, FormPanel will allocate only the space that the field component requires. Descendant classes can override the default false value here to indicate that their field component should be allowed to expand as much space as is available to it. For example: PanelField.
      Overrides:
      shouldExpand in class FormField
    • hasValidationLabel

      public boolean hasValidationLabel()
      This field itself typically will not show a validation label, as we delegate field validation to our embedded form fields. But, in keeping with the swing-forms general contract, you can still assign FieldValidators to instances of this field if you wish.
      Overrides:
      hasValidationLabel in class FormField
    • validate

      public boolean validate()
      Description copied from class: FormField
      Asks all registered FieldValidators (if any) to check the current value of this field to make sure it's valid. If no FieldValidators are registered, then the field is valid by default (i.e. no checking is done). If any validator returns false, then this method will return false.

      Updating the UI: this method will make the validation label to the right of the FormField visible automatically and will set its icon as appropriate. Tooltip text will be available in the case of a failed validation, to explain why the field is invalid.

      Note: If this FormField is currently disabled or currently invisible, then validation is skipped and this method does nothing.

      Overrides:
      validate in class FormField
      Returns:
      True if the field value is valid according to all our validators, false otherwise.
    • setUseTitleBorder

      public ImagePanelFormField setUseTitleBorder(boolean use)
      Decides whether to use a titled border around this field component (the default), or to use a traditional FormField field label instead.
    • isUseTitleBorder

      public boolean isUseTitleBorder()
    • getFieldLabelText

      public String getFieldLabelText()
      Returns the text that is either showing in the field label OR in the field's title border, depending on the value of useTitleBorder.
    • setFieldLabelText

      public ImagePanelFormField setFieldLabelText(String text)
    • setBgColor

      public ImagePanelFormField setBgColor(Color col)
    • getBgColor

      public Color getBgColor()
    • setDisplayMode

      public ImagePanelFormField setDisplayMode(ImagePanelConfig.DisplayMode mode)
    • getDisplayMode

      public ImagePanelConfig.DisplayMode getDisplayMode()
    • setRenderQuality

      public ImagePanelFormField setRenderQuality(ImagePanelConfig.Quality quality)
    • getRenderQuality

      public ImagePanelConfig.Quality getRenderQuality()
    • setZoomIncrement

      public ImagePanelFormField setZoomIncrement(double increment)
    • getZoomIncrement

      public double getZoomIncrement()
    • setEnableMouseCursor

      public ImagePanelFormField setEnableMouseCursor(boolean enable)
    • isEnableMouseCursor

      public boolean isEnableMouseCursor()
    • setEnableMouseDragging

      public ImagePanelFormField setEnableMouseDragging(boolean enable)
    • isEnableMouseDragging

      public boolean isEnableMouseDragging()
    • setEnableZoomOnMouseClick

      public ImagePanelFormField setEnableZoomOnMouseClick(boolean enable)
    • isEnableZoomOnMouseClick

      public boolean isEnableZoomOnMouseClick()
    • setEnableZoomOnMouseWheel

      public ImagePanelFormField setEnableZoomOnMouseWheel(boolean enable)
    • isEnableZoomOnMouseWheel

      public boolean isEnableZoomOnMouseWheel()