|
|||||||||
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 javax.swing.JPanel jwo.landserf.gui.ColourBar
public class ColourBar
Creates a colour bar to represent colour tables. Useful for colour editing and map legends.
Nested Class Summary |
---|
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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
---|
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 | |
---|---|
ColourBar(Frame parent,
ColourTable ct)
Creates the horizontal colour bar and associates a colour table with it. |
|
ColourBar(Frame parent,
ColourTable ct,
boolean showRange,
boolean isEditable)
Creates the horizontal colour bar and associates a colour table with it. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent event)
Responds to a change in one of the preset colour table selections by updating the editable colour table. |
void |
addColourEditListener(ColourEditListener ctListener)
Adds a colour edit listener. |
ImageIcon |
createIcon(int width,
int height)
Creates an ImageIcon representation of the colour bar. |
ColourRule |
getActiveRule()
Reports the currently selected active rule, or null if none selected. |
ColourTable |
getColourTable()
Reports the colour table associated with this colour bar. |
void |
removeColourEditListener(ColourEditListener ctListener)
Removes a colour edit listener form those informed by changes to the colour table. |
void |
setColourTable(ColourTable colourTable)
Changes the colour table associated with the colour bar. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColourBar(Frame parent, ColourTable ct)
parent
- Frame holding colour bar.ct
- Colour table associated with colour bar.public ColourBar(Frame parent, ColourTable ct, boolean showRange, boolean isEditable)
parent
- Frame holding colour bar.ct
- Colour table associated with colour bar.showRange
- Minimum and maximum values shown if true.isEditable
- Allows colour values to be edited if true.Method Detail |
---|
public void setColourTable(ColourTable colourTable)
colourTable
- New colour table to associate with bar.public ColourTable getColourTable()
public ColourRule getActiveRule()
public ImageIcon createIcon(int width, int height)
width
- Width of icon.height
- Height of icon.
public void addColourEditListener(ColourEditListener ctListener)
ctListener
- Colour edit listener to add.public void removeColourEditListener(ColourEditListener ctListener)
ctListener
- Colour edit listener to remove,public void actionPerformed(ActionEvent event)
actionPerformed
in interface ActionListener
event
- Action event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |