|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swfm.mica.core.MiPart
com.swfm.mica.core.MiContainer
com.swfm.mica.layouts.MiLayout
com.swfm.mica.core.MiVisibleContainer
com.swfm.mica.widgets.MiWidget
com.swfm.mica.parts.MiEditorPalette
com.swfm.mica.view.MiGraphicsPalette
This class creates a graphics palette. This is a list of graphics that can be dragged and dropped into the editor. It's contents is loaded from the Mica graphics files in the location specified by the setGraphicsPalettesDirectory() method (which by default is equal to ${Mi_HOME}/apps/palettes). The palette can be modified by drag and droping graphics from the graphics editor into the palette.
NOTE: this palette initially NOT visible - in order to reduce creation/startup time.
| Field Summary |
| Constructor Summary | |
MiGraphicsPalette()
Constructs a new MiGraphicsPalette. |
|
| Method Summary | |
java.lang.String |
getGraphicsPalettesDirectory()
Gets the directory in which to look for files *.pal that specify the palettes contents. |
boolean |
getHasChanged()
Gets whether this window has changed. |
MiiController |
getOpenDocumentController()
Gets the manager of the current open document. |
java.lang.String |
getPaletteFilenamePattern()
Gets the pattern to use to find palettes in the palettes directory. |
MiComboBox |
getPaletteNameComboBox()
Gets the combo box used to list palette names. |
boolean |
openFile(java.lang.String filename)
Loads this palette to from given filename. |
void |
processCommand(java.lang.String command)
Processes the given command. |
boolean |
saveFile(java.lang.String filename)
Saves this palette to the given filename into the current graphics palettes directory. |
void |
setDefaultController(MiiController controller)
Sets the default controller to use to load documents with. |
void |
setGraphicsPalettesDirectory(java.lang.String directoryName)
Sets the directory in which to look for files *.pal that specify the palettes contents. |
void |
setHasChanged(boolean flag)
Sets whether this window has changed. |
void |
setPaletteFilenamePattern(java.lang.String pattern)
Sets the pattern to use to find palettes in the palettes directory. |
boolean |
verifyLossOfAnyChanges()
Gets whether this window has changed. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.swfm.mica.layouts.MiiLayout |
getMinimumSize, getPreferredSize, invalidateLayout |
| Constructor Detail |
public MiGraphicsPalette()
| Method Detail |
public void setGraphicsPalettesDirectory(java.lang.String directoryName)
directoryName - the directory of palettespublic java.lang.String getGraphicsPalettesDirectory()
public void setDefaultController(MiiController controller)
controller - the default controllerpublic MiiController getOpenDocumentController()
public void setPaletteFilenamePattern(java.lang.String pattern)
pattern - the pattern (i.e. "*.pal")public java.lang.String getPaletteFilenamePattern()
public MiComboBox getPaletteNameComboBox()
public void processCommand(java.lang.String command)
Mi_OPEN_COMMAND_NAME
Mi_SAVE_COMMAND_NAME
Mi_SAVE_AS_COMMAND_NAME
processCommand in interface MiiCommandHandlerprocessCommand in class MiEditorPalettecommand - the command to executepublic void setHasChanged(boolean flag)
flag - true if this has changed.public boolean getHasChanged()
getHasChanged in class MiEditorPalettepublic boolean saveFile(java.lang.String filename)
saveFile in class MiEditorPalettefilename - the name of the file to save to
setGraphicsPalettesDirectory(java.lang.String)public boolean openFile(java.lang.String filename)
openFile in class MiEditorPalettefilename - the name of the file to load
setGraphicsPalettesDirectory(java.lang.String)public boolean verifyLossOfAnyChanges()
verifyLossOfAnyChanges in class MiEditorPalette
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||