public class TileAxis extends IPanel
Axis tics, tic annotations, and the (optional) axis label are painted using the tile axis font and foreground colors.
Modifier and Type | Class and Description |
---|---|
static class |
TileAxis.Placement
Placement of a tile axis.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier and Type | Method and Description |
---|---|
AxisTics |
getAxisTics()
Gets the axis tics painted by this tile axis.
|
int |
getIndex()
Gets the row or column index for this axis.
|
Mosaic |
getMosaic()
Gets the mosaic that contains this axis.
|
TileAxis.Placement |
getPlacement()
Gets the placement of this axis.
|
Tile |
getTile()
Gets the tile adjacent to this axis.
|
boolean |
isBottom()
Determines whether this axis is placed at bottom of mosaic.
|
boolean |
isHorizontal()
Determines whether this axis is placed at top or bottom of mosaic.
|
boolean |
isLeft()
Determines whether this axis is placed at left of mosaic.
|
boolean |
isRight()
Determines whether this axis is placed at right of mosaic.
|
boolean |
isTop()
Determines whether this axis is placed at top of mosaic.
|
boolean |
isVertical()
Determines whether this axis is placed at left or right of mosaic.
|
boolean |
isVerticalRotated()
Determines whether this axis is placed at left or right of mosaic, and
is rotated to read normal to the vertical axis.
|
protected void |
paintComponent(java.awt.Graphics g) |
void |
paintToRect(java.awt.Graphics2D g2d,
int x,
int y,
int w,
int h)
Paints this panel to a specified rectangle of a graphics context.
|
void |
setBounds(int x,
int y,
int width,
int height) |
void |
setFont(java.awt.Font font) |
void |
setFormat(java.lang.String format)
Sets the format for major tic annotation for this axis.
|
void |
setInterval(double interval)
Sets the interval between major labeled tics for this axis.
|
void |
setLabel(java.lang.String label)
Sets the label for this axis.
|
void |
setVerticalAxisRotated(boolean rotated)
Sets the rotation of tic labels in the vertical axis.
|
computeScale, createGraphics, getLineWidth, paintToImage, paintToImage, paintToPng, scaleLineWidth
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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
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, getPeer, 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, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public Mosaic getMosaic()
public int getIndex()
public TileAxis.Placement getPlacement()
public Tile getTile()
public boolean isTop()
public boolean isLeft()
public boolean isBottom()
public boolean isRight()
public boolean isHorizontal()
public boolean isVertical()
public boolean isVerticalRotated()
public void setInterval(double interval)
interval
- the major labeled tic interval.public void setLabel(java.lang.String label)
label
- the label.public void setFormat(java.lang.String format)
format
- the format.public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public void setVerticalAxisRotated(boolean rotated)
rotated
- true if rotated; false, otherwise.public AxisTics getAxisTics()
public void paintToRect(java.awt.Graphics2D g2d, int x, int y, int w, int h)
IPanel
Classes that extend this base class typically override this method to draw something besides children of this panel. When appropriate, those extensions may also call this method.
paintToRect
in class IPanel
g2d
- the graphics context.x
- the x-coordinate of the graphics rectangle.y
- the y-coordinate of the graphics rectangle.w
- the width of the graphics rectangle.h
- the height of the graphics rectangle.protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent