|
||||||||||
| 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.core.MiEditor
com.swfm.mica.core.MiWindow
com.swfm.mica.core.MiNativeWindow
com.swfm.mica.parts.MiEditorWindow
com.swfm.mica.parts.MiFileEditorWindow
com.swfm.mica.view.MiGraphicsWindow
This class implements a graphics editor using the Mica Graphics Framework. This includes the display and editing of graphics drawing primitives, widgets and node-line graphs. The graphics is loaded and saved to files in the mica graphics format.
This window has a graphics editor specific menubar, toolbar and an optional palette. The palette is a list of graphics that can be dragged into the editor. It's contents are loaded from the mica graphics files in the location specified by the property Mi_GRAPHICS_PALETTES_HOME (which by default is equal to ${Mi_CURRENT_DIRECTORY}/palettes).
| Field Summary | |
static java.lang.String |
Mi_GRAPHICS_WINDOW_ABOUT_MSG
|
static java.lang.String |
Mi_HIDE_PALETTE_COMMAND_NAME
|
static java.lang.String |
Mi_HIDE_PALETTE_LABELS_COMMAND_NAME
|
static java.lang.String |
Mi_MICA_DEFAULT_GRAPHICS_FILENAME
|
static java.lang.String |
Mi_MICA_GRAPHICS_FILENAME_EXTENSION
|
static java.lang.String |
Mi_PALETTE_SAVE_AS_NAME
|
static java.lang.String |
Mi_PALETTE_SAVE_NAME
|
static java.lang.String |
Mi_SHOW_PALETTE_LABELS_NAME
|
static java.lang.String |
Mi_SHOW_PALETTE_NAME
|
| Constructor Summary | |
MiGraphicsWindow(java.awt.Frame frame,
java.lang.String title,
MiBounds screenSize)
|
|
MiGraphicsWindow(java.awt.Frame frame,
java.lang.String title,
MiBounds screenSize,
MiJDKAPIComponentType nativeComponentType)
Constructs a new MiGraphicsWindow. |
|
MiGraphicsWindow(java.lang.String title,
MiBounds screenSize)
Constructs a new MiGraphicsWindow, creates a new AWT Frame, and adds this MiGraphicsWindow, with the given title and size, to the AWT Frame. |
|
| Method Summary | |
MiDrawingConnectionToolBar |
getConnectionToolbar()
|
MiiController |
getController()
Gets the manager of the current open document. |
MiToolBar |
getDrawingAttributesToolBar()
|
MiToolBar |
getDrawingShapeToolBar()
|
MiGraphicsEditor |
getGraphEditor()
Gets the graphics editor that manages the main panel of this window. |
boolean |
getHasChanged()
Gets whether this window has changed. |
MiHelpWindow |
getHelpWindow()
|
boolean |
getKeepShapesWithinPageBounds()
|
MiPageManager |
getPageManager()
|
MiRulerBox |
getRulerBox()
|
MiModelPropertyViewManager |
getRulersDialogBox()
|
MiDrawingVisibilityToolBar |
getVisiblityToolbar()
|
MiPart |
makeDefaultEditorPanel()
Makes the graphics editor panel for the window. |
boolean |
openPalette(java.lang.String filename)
Opens the palette and loads it with the graphics in the given filename. |
void |
print()
|
boolean |
printFile(java.lang.String filename)
|
boolean |
processAction(MiiAction action)
Processes the given action. |
void |
processCommand(java.lang.String command)
Processes the given command. |
boolean |
save(MiFileEditorWindowDocumentView view,
java.io.OutputStream stream,
java.lang.String streamName)
Saves the contents of the graphics editor of the given view. |
boolean |
save(java.io.OutputStream stream,
java.lang.String streamName)
Saves the contents of the graphics editor. |
void |
setCanHaveEditableAnnotationPoints(boolean flag)
|
void |
setCanHaveEditableConnectionPoints(boolean flag)
|
void |
setCanHaveVisibleAnnotationPoints(boolean hasPts,
boolean hasPtsDialog)
|
void |
setCanHaveVisibleConnectionPoints(boolean hasPts,
boolean hasPtsDialog)
|
void |
setCapabilities(boolean hasGraphsMenu,
boolean hasLayoutsMenu,
boolean hasDrawingToolbar,
boolean hasShapeAttributesDialog,
boolean hasRulers,
boolean hasDrawingPages,
boolean hasDrawingPagesDialogBox,
boolean hasDrawingGrid,
boolean hasLayers,
boolean hasBirdsEyeView,
boolean hasPalette,
boolean hasConnectionToolBar,
boolean hasVisibilityToolBar,
boolean canHaveVisibleConnectionPoints,
boolean canHaveVisibleAnnotationPoints,
boolean hasConnectionPointsDialog,
boolean hasAnnotationPointsDialog)
|
void |
setController(MiiController c)
Sets the manager of the current open document. |
void |
setCurrentView(MiFileEditorWindowDocumentView view)
|
void |
setDefaultController(MiiController controller)
Sets the default controller to use to load documents with. |
void |
setDefaultPaletteController(MiiController controller)
Sets the default controller to use to load palettes with. |
void |
setEditor(MiEditor editor)
Sets the editor that the menubar, statusbar and toolbar and (3rd button) background menu act on and report about. |
void |
setHasAnotherView(boolean flag)
|
void |
setHasBirdsEyeView(boolean flag)
|
void |
setHasConnectionToolbar(boolean flag)
|
void |
setHasDrawingGrid(boolean flag)
|
void |
setHasDrawingPages(boolean flag)
|
void |
setHasDrawingToolbar(boolean flag)
|
void |
setHasFishEyeView(boolean flag)
|
void |
setHasLayers(boolean flag)
Sets whether this MiEditor is to have 'layers'. |
void |
setHasMagnifierLens(boolean flag)
|
void |
setHasMagnifierView(boolean flag)
|
void |
setHasRulers(boolean flag)
|
void |
setHasVisibilityToolbar(boolean flag)
|
void |
setKeepShapesWithinPageBounds(boolean flag)
|
void |
setupDefaultSelectionGraphics()
|
boolean |
verifyLossOfAnyChanges()
Gets whether this window has changed. |
| Methods inherited from class com.swfm.mica.core.MiNativeWindow |
dispose, freeWindowLock, getAWTComponent, getForceResizeOfWindowContainingComponent, getFrame, getNativeComponentType, getSendCommandInsteadOfDispose, getSwingComponent, getTitle, getWindow, getWindowLock, setDefaultCloseCommand, setDeviceBounds, setForceResizeOfWindowContainingComponent, setTitle, setVisible, toFront |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String Mi_HIDE_PALETTE_COMMAND_NAME
public static final java.lang.String Mi_HIDE_PALETTE_LABELS_COMMAND_NAME
public static final java.lang.String Mi_PALETTE_SAVE_NAME
public static final java.lang.String Mi_PALETTE_SAVE_AS_NAME
public static final java.lang.String Mi_SHOW_PALETTE_NAME
public static final java.lang.String Mi_SHOW_PALETTE_LABELS_NAME
public static final java.lang.String Mi_MICA_GRAPHICS_FILENAME_EXTENSION
public static final java.lang.String Mi_MICA_DEFAULT_GRAPHICS_FILENAME
public static final java.lang.String Mi_GRAPHICS_WINDOW_ABOUT_MSG
| Constructor Detail |
public MiGraphicsWindow(java.lang.String title,
MiBounds screenSize)
title - the text to be displayed in the
window borderscreenSize - the size
public MiGraphicsWindow(java.awt.Frame frame,
java.lang.String title,
MiBounds screenSize,
MiJDKAPIComponentType nativeComponentType)
MiGraphicsWindow gw = new MiGraphicsWindow( MiUtility.getFrame(jComponent), null, new MiBounds(0,0,400,400), Mi_SWING_LIGHTWEIGHT_COMPONENT_TYPE); jComponent.add("Center", gw.getSwingComponent());
or, if adding to a JFrame:
jFrame.getContentPane().add("Center", gw.getSwingComponent());
And if nativeComponentType == Mi_AWT_HEAVYWEIGHT_COMPONENT_TYPE:
MiGraphicsWindow gw = new MiGraphicsWindow( MiUtility.getFrame(awtContainer), null, new MiBounds(0,0,400,400), Mi_AWT_HEAVYWEIGHT_COMPONENT_TYPE); awtContainer.add("Center", gw.getAWTComponent());
frame - the parent frametitle - the window border textscreenSize - the size of the window in pixelsnativeComponentType - the type of the component to
use: Mi_AWT_1_0_2_HEAVYWEIGHT_COMPONENT_TYPE
or Mi_AWT_1_1_HEAVYWEIGHT_COMPONENT_TYPE
or Mi_AWT_HEAVYWEIGHT_COMPONENT_TYPE
or Mi_SWING_LIGHTWEIGHT_COMPONENT_TYPE
or null (to use the default)MiSystem.getDefaultJDKAPIComponentType()
public MiGraphicsWindow(java.awt.Frame frame,
java.lang.String title,
MiBounds screenSize)
| Method Detail |
public MiiController getController()