Package hec.gfx2d
Class AxisLabel
- All Implemented Interfaces:
G2dToolbarListener
,ImageObserver
,MenuContainer
,Serializable
,Observer
,Accessible
,UnitsComponent
A component that displays the label of an Axis.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hec.gfx2d.G2dComponent
G2dComponent.DefaultPreferredSizeProvider, G2dComponent.EditPropertyListener
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class hec.gfx2d.G2dLabel
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90
Fields inherited from class hec.gfx2d.G2dComponent
_parent, _popupMenu, BOTTOM, LEFT, RIGHT, TOP
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getDisplayUnitsString
(int v) This method allows the retrieves the units string for a given units systemprotected String
Compute the preferred size based on label size and orientationObject[]
boolean
objectPopupMenu
(LocalPt pt, int modifiers) Overrided here to disable the object popup menu for the Axis Labels.void
Paints this label to a given graphics context.void
setDisplayScaleFactor
(int paramId, double scaleFactor) Sets the scaling factor for the data.void
setDisplayUnitsSystem
(int units) Sets the display unit system for this label.void
update
(Observable o, Object arg) Methods inherited from class hec.gfx2d.G2dLabel
addPropertiesOKListener, createPopupMenu, drawBorder, getAlignment, getAlignmentString, getBackgroundString, getBorderStyleString, getBorderWeight, getFillColor, getFillColorString, getFillPattern, getFillPatternString, getFontFamily, getFontSize, getFontSizes, getFontString, getFontStyle, getFontStyleString, getForegroundString, getG2dFont, getIcon, getIconPath, getMinimumSize, getMinimumSize, getPreferredSize, getProperties, getRotation, getSpacing, getText, getUseFontScaling, isBackgroundDrawn, isBackgroundVisible, isBorderDrawn, isBorderVisible, setAlignment, setBackground, setBackground, setBackgroundVisible, setBorderColor, setBorderStyle, setBorderVisible, setBorderWeight, setDrawBackgroundOff, setDrawBackgroundOn, setDrawBorderOff, setDrawBorderOn, setFillColor, setFillColor, setFillPattern, setFont, setFont, setFontFamily, setFontInfo, setFontSize, setFontSizes, setFontStyle, setFontStyle, setForeground, setIcon, setIcon, setProperties, setRotation, setSpacing, setText, setText, setUseFontScaling
Methods inherited from class hec.gfx2d.G2dComponent
getG2dPanel, getMouseAdapter, getPreferredSize, getToolTipText, paint, paintComponent, paintGfx, pointerOver, setG2dPanel, setMouseAdapter, setMouseAdapter, setPreferredSizeProvider
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
AxisLabel
Drawing properties
-
-
Method Details
-
getPopupMenuTitle
- Overrides:
getPopupMenuTitle
in classG2dLabel
-
setDisplayUnitsSystem
public void setDisplayUnitsSystem(int units) Sets the display unit system for this label. This allows the Axis Label to replace Units Templates with the correct unit string values. If this value is undefined the units template will be replaced with a blank string.- Specified by:
setDisplayUnitsSystem
in interfaceUnitsComponent
- Parameters:
units
- a valid units system such as ENGLISH_ID,SI_ID, or UNDEF_ID
-
setDisplayScaleFactor
public void setDisplayScaleFactor(int paramId, double scaleFactor) Sets the scaling factor for the data. The radio button does not render data but rather renders a units string in a given unit system so this method is defined, but un-implemented- Specified by:
setDisplayScaleFactor
in interfaceUnitsComponent
- Parameters:
scaleFactor
-paramId
- This is the identifier of the paramater to scale. If the data is not of this type then it is ignored
-
getDisplayUnitsString
Description copied from interface:UnitsComponent
This method allows the retrieves the units string for a given units system- Specified by:
getDisplayUnitsString
in interfaceUnitsComponent
- See Also:
-
update
-
objectPopupMenu
Overrided here to disable the object popup menu for the Axis Labels. The properties editor panels are now in the AxisTics popup menu.- Overrides:
objectPopupMenu
in classG2dLabel
- Parameters:
pt
-modifiers
-- Returns:
-
editProperties
public void editProperties()- Overrides:
editProperties
in classG2dLabel
-
getPreferredSizeLocal
Description copied from class:G2dLabel
Compute the preferred size based on label size and orientation- Overrides:
getPreferredSizeLocal
in classG2dLabel
- Returns:
- Dimension preferred sized of the component
-
paintGfx
Paints this label to a given graphics context. Any units templates are removed and replaced with the correct units string. -
getTextSubstitutionObjects
- Overrides:
getTextSubstitutionObjects
in classG2dLabel
-