Class DefaultAxisEditor

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
DefaultValueAxisEditor

class DefaultAxisEditor extends JPanel implements ActionListener
A panel for editing the properties of an axis.
  • Field Details

    • label

      private JTextField label
      The axis label.
    • labelFont

      private Font labelFont
      The label font.
    • labelPaintSample

      private PaintSample labelPaintSample
      The label paint.
    • labelFontField

      private JTextField labelFontField
      A field showing a description of the label font.
    • tickLabelFont

      private Font tickLabelFont
      The font for displaying tick labels on the axis.
    • tickLabelFontField

      private JTextField tickLabelFontField
      A field containing a description of the font for displaying tick labels on the axis.
    • tickLabelPaintSample

      private PaintSample tickLabelPaintSample
      The paint (color) for the tick labels.
    • slot1

      private JPanel slot1
      An empty sub-panel for extending the user interface to handle more complex axes.
    • slot2

      private JPanel slot2
      An empty sub-panel for extending the user interface to handle more complex axes.
    • showTickLabelsCheckBox

      private JCheckBox showTickLabelsCheckBox
      A flag that indicates whether or not the tick labels are visible.
    • showTickMarksCheckBox

      private JCheckBox showTickMarksCheckBox
      A flag that indicates whether or not the tick marks are visible.
    • tickLabelInsets

      private RectangleInsets tickLabelInsets
      The tick label insets.
    • labelInsets

      private RectangleInsets labelInsets
      The label insets.
    • otherTabs

      private JTabbedPane otherTabs
      A tabbed pane for...
    • localizationResources

      protected static ResourceBundle localizationResources
      The resourceBundle for the localization.
  • Constructor Details

    • DefaultAxisEditor

      public DefaultAxisEditor(Axis axis)
      Standard constructor: builds a panel for displaying/editing the properties of the specified axis.
      Parameters:
      axis - the axis whose properties are to be displayed/edited in the panel.
  • Method Details

    • getInstance

      public static DefaultAxisEditor getInstance(Axis axis)
      A static method that returns a panel that is appropriate for the axis type.
      Parameters:
      axis - the axis whose properties are to be displayed/edited in the panel.
      Returns:
      A panel or null if axis is null.
    • getLabel

      public String getLabel()
      Returns the current axis label.
      Returns:
      The current axis label.
    • getLabelFont

      public Font getLabelFont()
      Returns the current label font.
      Returns:
      The current label font.
    • getLabelPaint

      public Paint getLabelPaint()
      Returns the current label paint.
      Returns:
      The current label paint.
    • isTickLabelsVisible

      public boolean isTickLabelsVisible()
      Returns a flag that indicates whether or not the tick labels are visible.
      Returns:
      true if tick mark labels are visible.
    • getTickLabelFont

      public Font getTickLabelFont()
      Returns the font used to draw the tick labels (if they are showing).
      Returns:
      The font used to draw the tick labels.
    • getTickLabelPaint

      public Paint getTickLabelPaint()
      Returns the current tick label paint.
      Returns:
      The current tick label paint.
    • isTickMarksVisible

      public boolean isTickMarksVisible()
      Returns the current value of the flag that determines whether or not tick marks are visible.
      Returns:
      true if tick marks are visible.
    • getTickLabelInsets

      public RectangleInsets getTickLabelInsets()
      Returns the current tick label insets value
      Returns:
      The current tick label insets value.
    • getLabelInsets

      public RectangleInsets getLabelInsets()
      Returns the current label insets value
      Returns:
      The current label insets value.
    • getOtherTabs

      public JTabbedPane getOtherTabs()
      Returns a reference to the tabbed pane.
      Returns:
      A reference to the tabbed pane.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handles user interaction with the property panel.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - information about the event that triggered the call to this method.
    • attemptLabelFontSelection

      private void attemptLabelFontSelection()
      Presents a font selection dialog to the user.
    • attemptModifyLabelPaint

      private void attemptModifyLabelPaint()
      Allows the user the opportunity to change the outline paint.
    • attemptTickLabelFontSelection

      public void attemptTickLabelFontSelection()
      Presents a tick label font selection dialog to the user.
    • setAxisProperties

      public void setAxisProperties(Axis axis)
      Sets the properties of the specified axis to match the properties defined on this panel.
      Parameters:
      axis - the axis.