|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent org.geotools.gui.swing.ColorBar
ColorRamp
instead.
A color bar with a graduation. The colors can be specified with a SampleDimension
,
an array of Color
s or an IndexColorModel
bject, and the graduation is
specified with a Graduation
object. The resulting ColorBar
object
is usually painted together with a remote sensing image, for example in a
MapPane
object.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
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 | |
ColorBar()
Deprecated. Construct an initially empty color bar. |
|
ColorBar(GridCoverage coverage)
Deprecated. Construct a color bar for the specified grid coverage. |
Method Summary | |
void |
addNotify()
Deprecated. Notifies this component that it now has a parent component. |
protected AbstractGraduation |
createGraduation(AbstractGraduation reuse,
Category category,
Unit units)
Deprecated. Returns a graduation for the specified category. |
java.awt.Color[] |
getColors()
Deprecated. Returns the colors painted by this ColorBar . |
Graduation |
getGraduation()
Deprecated. Returns the graduation to paint over colors. |
int |
getOrientation()
Deprecated. Returns the component's orientation (horizontal or vertical). |
boolean |
isLabelVisibles()
Deprecated. Tests if graduation labels are paint on top of the colors ramp. |
void |
removeNotify()
Deprecated. Notifies this component that it no longer has a parent component. |
boolean |
setColors(java.awt.Color[] colors)
Deprecated. Sets the colors to paint. |
boolean |
setColors(GridCoverage coverage)
Deprecated. Sets the graduation and the colors to paint from a GridCoverage .
|
boolean |
setColors(java.awt.image.IndexColorModel model)
Deprecated. Sets the colors to paint from an IndexColorModel . |
boolean |
setColors(SampleDimension band)
Deprecated. Sets the graduation and the colors to paint from a SampleDimension .
|
void |
setForeground(java.awt.Color color)
Deprecated. Sets the label colors. |
boolean |
setGraduation(Graduation graduation)
Deprecated. Set the graduation to paint on top of the color bar. |
void |
setLabelVisibles(boolean visible)
Deprecated. Sets whatever the graduation labels should be painted on top of the colors ramp. |
void |
setOrientation(int orient)
Deprecated. Set the component's orientation (horizontal or vertical). |
java.lang.String |
toString()
Deprecated. Returns a string representation for this color ramp. |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ColorBar()
setColors(...)
methods.
public ColorBar(GridCoverage coverage)
coverage
- The grid coverage.Method Detail |
public Graduation getGraduation()
null
.
public boolean setGraduation(Graduation graduation)
setColors(SampleDimension)
and setColors(GridCoverage)
.
This method will fire a property change event with the "graduation"
name.
graduation
- The new graduation, or null
if none.
true
if this object changed as a result of this call.public java.awt.Color[] getColors()
ColorBar
.
null
).public boolean setColors(java.awt.Color[] colors)
"colors"
name.
colors
- The colors to paint.
true
if the state of this ColorBar
changed as a result of this call.setColors(GridCoverage)
,
setColors(SampleDimension)
,
setColors(IndexColorModel)
,
getColors()
,
getGraduation()
public boolean setColors(java.awt.image.IndexColorModel model)
IndexColorModel
.
model
- The colors to paint.
true
if the state of this ColorBar
changed as a result of this call.setColors(GridCoverage)
,
setColors(SampleDimension)
,
setColors(Color[])
,
getColors()
,
getGraduation()
public boolean setColors(SampleDimension band)
SampleDimension
.
The range of indexed colors and the minimum and maximum values are fetched
from the supplied band.
band
- The band, or null
.
true
if the state of this ColorBar
changed as a result of this call.setColors(GridCoverage)
,
setColors(IndexColorModel)
,
setColors(Color[])
,
getColors()
,
getGraduation()
public boolean setColors(GridCoverage coverage)
GridCoverage
.
The range of indexed colors and the minimum and maximum values are fetched
from the supplied grid coverage.
coverage
- The grid coverage, or null
.
true
if the state of this ColorBar
changed as a result of this call.setColors(IndexColorModel)
,
setColors(SampleDimension)
,
getColors()
,
getGraduation()
public int getOrientation()
SwingConstants.HORIZONTAL
or SwingConstants.VERTICAL
).
public void setOrientation(int orient)
orient
- SwingConstants.HORIZONTAL
or SwingConstants.VERTICAL
.public boolean isLabelVisibles()
true
.
public void setLabelVisibles(boolean visible)
public void setForeground(java.awt.Color color)
null
value reset the automatic color.
Component.getForeground()
protected AbstractGraduation createGraduation(AbstractGraduation reuse, Category category, Unit units)
NumberGraduation
or
LogarithmicNumberGraduation
), but doesn't have to set any graduation's
properties like minimum and maximum values. This will be handle by the caller.
reuse
object is non-null and is of the appropriate
class, then this method can returns reuse
without creating a new
graduation. This help to reduce garbage collection.
reuse
- The graduation to reuse if possible.category
- The category to create graduation for.units
- The units for the graduation.
public java.lang.String toString()
public void addNotify()
public void removeNotify()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |