|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.ResourceManager
ucar.unidata.ui.colortable.ColorTableManager
public class ColorTableManager
A class to manage a collection of system and user color tables
| Field Summary | |
|---|---|
static PatternFileFilter |
FILTER_ACT
File filter used for ACT color tables |
static PatternFileFilter |
FILTER_GEM
File filter used for Gempak color tables |
static PatternFileFilter |
FILTER_IDV
File filter used for IDV color tables |
static PatternFileFilter |
FILTER_MCI
File filter used for McIdas color tables |
static PatternFileFilter |
FILTER_PAL
File filter used for PAL color tables |
static String |
NAME_DEFAULT
THe name of the default color table |
static String |
PROP_CANCEL
The cancel property for PropertyChangeListeners |
static String |
PROP_CLOSE
The close property for PropertyChangeListeners |
static String |
PROP_COLORTABLE
The color table property for PropertyChangeListeners |
static String |
PROP_RANGE
The range property for PropertyChangeListeners |
String |
TAG_COLORTABLE
Xml tag name |
String |
TAG_COLORTABLES
Xml tag name |
String |
TAG_NAME
Xml tag name |
| Fields inherited from class ucar.unidata.util.ResourceManager |
|---|
listOfResourceLists, log_, LU, nameToObject, PROP_RESOURCECHANGE, PROP_RESOURCEREMOVE, resources, usersList, writablePath |
| Constructor Summary | |
|---|---|
ColorTableManager()
Create me |
|
| Method Summary | |
|---|---|
NamedObject |
doImport(boolean makeUnique)
Import a color table |
ColorTableEditor |
edit(ColorTable colorTable,
PropertyChangeListener listener)
Create a ColorTableEditor for editing the given color table |
List |
getCategories()
Return a list (String) of the categories defined by the color tables |
ColorTable |
getColorTable(String name)
Lookup and return the color table identified by the given name |
List |
getColorTables()
Return a list of all ColorTable objects |
ColorTable |
getDefaultColorTable()
Find and return the default color table |
protected String |
getExportContents(NamedObject object,
String file)
When we do an export this method is called to create the String contents that is actually written out. |
JLabel |
getLabel(String colorTableName)
|
static ColorTableManager |
getManager()
Get the singleton |
List |
getReadFileFilters()
Return the file filters used for writing a file on an import |
String |
getTitle()
Overwrite the base class (ResourceManager) method to return the name of the resource we deal with. |
List |
getWriteFileFilters()
Return the file filters used for writing a file on an export |
protected Object |
initResource(ResourceCollection resources,
int index)
Check to see if these are any of the special resources |
static void |
main(String[] args)
Merge the programmaticcally created color tables with the ones given on the command line. |
void |
makeColorTableMenu(ObjectListener listener,
List l)
Make the set of color table menus. |
void |
makeColorTableMenu(ObjectListener listener,
List l,
boolean showLocal)
Make the set of color table menus. |
static void |
setManager(ColorTableManager theManager)
set the singleton manager |
| Methods inherited from class ucar.unidata.util.ResourceManager |
|---|
addPropertyChangeListener, addUsers, doExport, doExport, doImport, doImport, doNew, doNew, doNew, doSaveAs, firePropertyChange, firePropertyChange, getDefault, getEncoder, getFileFilters, getFileSuffix, getObject, getResources, getResourceTimestamp, getUsersIndex, getUsersObject, hasUsers, init, initDone, isUsers, processObject, reloadResources, removePropertyChangeListener, removeUsers, resourceExists, shouldWeIgnoreThisXml, toObject, toObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME_DEFAULT
public static final String PROP_COLORTABLE
public static final String PROP_RANGE
public static final String PROP_CANCEL
public static final String PROP_CLOSE
public String TAG_COLORTABLES
public String TAG_COLORTABLE
public String TAG_NAME
public static final PatternFileFilter FILTER_IDV
public static final PatternFileFilter FILTER_GEM
public static final PatternFileFilter FILTER_MCI
public static final PatternFileFilter FILTER_PAL
public static final PatternFileFilter FILTER_ACT
| Constructor Detail |
|---|
public ColorTableManager()
| Method Detail |
|---|
public static void setManager(ColorTableManager theManager)
theManager - The singleton managerpublic static ColorTableManager getManager()
public List getWriteFileFilters()
getWriteFileFilters in class ResourceManagerpublic List getReadFileFilters()
getReadFileFilters in class ResourceManagerpublic String getTitle()
getTitle in class ResourceManagerpublic List getColorTables()
public List getCategories()
public ColorTable getDefaultColorTable()
public ColorTable getColorTable(String name)
name - The color table name
public ColorTableEditor edit(ColorTable colorTable,
PropertyChangeListener listener)
colorTable - The color table to editlistener - Who should get changes sent to (may be null)
public void makeColorTableMenu(ObjectListener listener,
List l)
listener - The listener to pass events to.l - The list to add the JMenus topublic JLabel getLabel(String colorTableName)
public void makeColorTableMenu(ObjectListener listener,
List l,
boolean showLocal)
listener - The listener to pass events to.l - The list to add the JMenus toshowLocal - If true then add "public static void main(String[] args)
args - Command line arguments.
protected String getExportContents(NamedObject object,
String file)
getExportContents in class ResourceManagerobject - The color tablefile - The file name
protected Object initResource(ResourceCollection resources,
int index)
initResource in class ResourceManagerresources - resourcesindex - which one
public NamedObject doImport(boolean makeUnique)
doImport in class ResourceManagermakeUnique - If true then we change the name of the color table so it is unique
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||