public class ColorTableEditor extends WindowHolder
ColorTableCanvas
that does most of the actual work
but this class serves as the intermediary between the canvas and calling
codeModifier and Type | Field and Description |
---|---|
static LogUtil.LogCategory |
log_
For logging errors
|
contents, dialog, frame, window
Constructor and Description |
---|
ColorTableEditor(ColorTableManager colorTableManager)
Create a stand alone color table editor
|
ColorTableEditor(ColorTableManager colorTableManager,
ColorTable table)
Create an editor for the given color table
|
ColorTableEditor(ColorTableManager colorTableManager,
ColorTable table,
java.beans.PropertyChangeListener listener)
Create an editor for the given color table
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle the action (eg: CLOSE, APPLY, CANCEL, etc).
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add the given property change listener
|
void |
doClose()
Close the window
|
protected void |
doMakeFileMenu(javax.swing.JMenu fileMenu)
Add the file menu items
|
protected javax.swing.JMenuBar |
doMakeMenuBar()
Make the menu bar
|
void |
doMakeViewMenu()
Make the View menu.
|
ColorTableCanvas |
getCanvas()
Get the canvas
|
ColorTableManager |
getColorTableManager()
Get the manager
|
java.lang.String |
getColorTableName()
Get the name of the currently edited color table
|
boolean |
getOk()
Was OK pressed
|
java.lang.String |
getWindowTitle()
_more_
|
static void |
main(java.lang.String[] args)
Test main
|
void |
setColorTable(ColorTable ct)
Set the current color table
|
void |
setColorTable(java.lang.String ctName)
Find the color table with the given name and use it
|
protected void |
setDialogTitle()
Set the title of the window to the default
|
static void |
setHelpTopDir(java.lang.String topDir) |
void |
setRange(Range range)
Set the range used by the color table canvas
|
void |
setVisible(boolean v)
Set the visiblity of the window
|
void |
show()
Show the window
|
void |
updateViewMenu(javax.swing.JMenu m) |
close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, showModal, toFront, windowIsClosing
public static LogUtil.LogCategory log_
public ColorTableEditor(ColorTableManager colorTableManager)
colorTableManager
- The managerpublic ColorTableEditor(ColorTableManager colorTableManager, ColorTable table)
colorTableManager
- The managertable
- The color table (may be null)public ColorTableEditor(ColorTableManager colorTableManager, ColorTable table, java.beans.PropertyChangeListener listener)
colorTableManager
- The managertable
- The color table (may be null)listener
- The property change listener to route events to. May be nullpublic void show()
show
in class WindowHolder
public ColorTableManager getColorTableManager()
public java.lang.String getColorTableName()
public java.lang.String getWindowTitle()
getWindowTitle
in class WindowHolder
public void updateViewMenu(javax.swing.JMenu m)
protected javax.swing.JMenuBar doMakeMenuBar()
public ColorTableCanvas getCanvas()
protected void doMakeFileMenu(javax.swing.JMenu fileMenu)
fileMenu
- The file menupublic void doMakeViewMenu()
public void setColorTable(java.lang.String ctName)
ctName
- The color table name to lookuppublic void setColorTable(ColorTable ct)
ct
- The new color table to usepublic void setRange(Range range)
range
- The new rangepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener to route events to.public void setVisible(boolean v)
v
- On or off.protected void setDialogTitle()
public void doClose()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class WindowHolder
e
- The actionpublic static void setHelpTopDir(java.lang.String topDir)
public boolean getOk()
public static void main(java.lang.String[] args)
args
- cmd line args