|
|||||||||
| Home >> All >> jac >> ide >> [ diagrams overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jac.ide.diagrams
Class DiagramApplet

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
jac.ide.diagrams.DiagramApplet
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, jac.aspects.gui.View
- Direct Known Subclasses:
- DiagramView
- public class DiagramApplet
- extends javax.swing.JApplet
- implements jac.aspects.gui.View
- extends javax.swing.JApplet
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
| Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JApplet |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.applet.Applet |
|
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| 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 | |
DiagramApplet(java.lang.Object substance)
|
|
| Method Summary | |
void |
addViewChangeListener(ViewChangeListener vsl)
|
(package private) void |
buildAspectBar()
|
(package private) void |
buildClassBar()
|
(package private) void |
buildGroupBar()
|
(package private) void |
buildInstanceBar()
|
void |
close()
This method is called by the system when the view is closed. |
protected void |
createAttributeChoices(javax.swing.JPanel panel)
Creates the attribute choices. |
protected javax.swing.JPanel |
createAttributesPanel()
Creates the attributes panel. |
protected javax.swing.JPanel |
createButtonPanel()
Creates the buttons panel. |
protected void |
createButtons(javax.swing.JPanel panel)
Creates the buttons shown in the buttons panel. |
protected javax.swing.JComboBox |
createColorChoice(java.lang.String attribute)
Creates the color choice for the given attribute. |
protected Drawing |
createDrawing()
Creates the drawing used in this application. |
protected DrawingView |
createDrawingView()
Creates the drawing view used in this application. |
protected javax.swing.JComboBox |
createFontChoice()
Creates the font choice. |
protected javax.swing.JFileChooser |
createOpenFileChooser()
|
protected Tool |
createSelectionTool()
Creates the selection tool used in this editor. |
StorageFormatManager |
createStorageFormatManager()
|
protected ToolButton |
createToolButton(java.lang.String iconName,
java.lang.String toolName,
Tool tool)
Creates a tool button with the given image, tool, and text |
protected javax.swing.JPanel |
createToolPalette()
Creates the tools palette. |
protected void |
createTools(javax.swing.JPanel palette)
Creates the tools. |
Drawing |
drawing()
Gets the current drawing. |
void |
figureSelectionChanged(DrawingView view)
Handles a change of the current selection. |
ClassFigure |
findClass(jac.ide.Class _class)
|
Figure |
findElement(jac.ide.ModelElement element)
|
Figure |
findElement(jac.ide.TypedElement te)
|
jac.aspects.gui.View |
getParentView()
Returns the parent view of this view. |
java.lang.String[] |
getRequiredVersions()
Subclasses should override this method to specify to which versions of JHotDraw they are compatible. |
StorageFormatManager |
getStorageFormatManager()
Return the StorageFormatManager for this application.The StorageFormatManager is used when storing and restoring Drawing from the file system. |
java.lang.Object |
getSubstance()
Get the value of substance. |
UndoManager |
getUndoManager()
|
protected VersionControlStrategy |
getVersionControlStrategy()
|
private java.lang.String |
guessType(java.lang.String file)
|
void |
init()
Initializes the applet and creates its contents. |
private void |
initDrawing()
|
void |
load()
|
protected void |
loadDrawing(java.lang.String param)
|
void |
paletteUserOver(PaletteButton button,
boolean inside)
Handles when the mouse enters or leaves a palette button. |
void |
paletteUserSelected(PaletteButton button)
Handles a user selection in the palette. |
void |
promptOpen()
Shows a file dialog and opens a drawing. |
void |
promptSave()
|
private void |
readDrawing(java.lang.String filename)
|
private void |
readFromObjectInput(java.lang.String filename)
|
private void |
readFromStorableInput(java.lang.String filename)
|
void |
refreshView()
Refreshes the whole view. |
void |
refreshViewItem(jac.core.rtti.FieldItem field,
jac.core.rtti.MethodItem method,
java.lang.Object[] args)
Refreshes an item of the current view. |
void |
removeViewChangeListener(ViewChangeListener vsl)
|
void |
save()
|
protected void |
saveDrawing(StorageFormat storeFormat,
java.lang.String file)
|
protected void |
setBufferedDisplayUpdate()
|
void |
setFocus(jac.core.rtti.FieldItem field,
java.lang.Object extraOption)
Give the focus to a specified FieldItem. |
private void |
setSelected(ToolButton button)
|
protected void |
setSimpleDisplayUpdate()
|
void |
setSubstance(jac.ide.Diagram v)
Set the value of substance. |
private void |
setTool(Tool t,
java.lang.String name)
|
protected void |
setUndoManager(UndoManager newUndoManager)
|
private void |
setupAttributes()
|
protected void |
showHelp()
Shows a help page for the applet. |
void |
showStatus(java.lang.String msg)
Displays the specified message in the status window if that window exists. |
private void |
startSleeper()
*** netscape browser work around *** |
private void |
stopSleeper()
|
Tool |
tool()
Gets the current tool. |
void |
toolDone()
Sets the default tool of the editor. |
DrawingView |
view()
Gets the current drawing view. |
DrawingView[] |
views()
|
void |
viewSelectionChanged(DrawingView oldView,
DrawingView newView)
|
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getPreferredSize, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, start, stop |
| Methods inherited from class java.awt.Panel |
addNotify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
JACIMAGES
private static final java.lang.String JACIMAGES
- See Also:
- Constant Field Values
fDrawing
private transient Drawing fDrawing
fTool
private transient Tool fTool
fView
private transient DrawingView fView
fDefaultToolButton
private transient ToolButton fDefaultToolButton
fSelectedToolButton
private transient ToolButton fSelectedToolButton
fSimpleUpdate
private transient boolean fSimpleUpdate
fUpdateButton
private transient javax.swing.JButton fUpdateButton
fFrameColor
private transient javax.swing.JComboBox fFrameColor
fFillColor
private transient javax.swing.JComboBox fFillColor
fTextColor
private transient javax.swing.JComboBox fTextColor
fArrowChoice
private transient javax.swing.JComboBox fArrowChoice
fFontChoice
private transient javax.swing.JComboBox fFontChoice
fSleeper
private transient java.lang.Thread fSleeper
fIconkit
private Iconkit fIconkit
myUndoManager
private transient UndoManager myUndoManager
fgUntitled
static java.lang.String fgUntitled
fgDrawPath
private static final java.lang.String fgDrawPath
- See Also:
- Constant Field Values
IMAGES
public static final java.lang.String IMAGES
- See Also:
- Constant Field Values
fStorageFormatManager
private StorageFormatManager fStorageFormatManager
classPalette
javax.swing.JPanel classPalette
aspectPalette
javax.swing.JPanel aspectPalette
instancePalette
javax.swing.JPanel instancePalette
groupPalette
javax.swing.JPanel groupPalette
currentPalette
javax.swing.JPanel currentPalette
classDefaultTool
ToolButton classDefaultTool
aspectDefaultTool
ToolButton aspectDefaultTool
instanceDefaultTool
ToolButton instanceDefaultTool
groupDefaultTool
ToolButton groupDefaultTool
substance
jac.ide.Diagram substance
| Constructor Detail |
DiagramApplet
public DiagramApplet(java.lang.Object substance)
| Method Detail |
getParentView
public jac.aspects.gui.View getParentView()
- Description copied from interface:
jac.aspects.gui.View - Returns the parent view of this view.
The parent view is generally a view that aggregates (or contains) the current view. If the current view is not contained in any other view, then the parent view is null.
- Specified by:
getParentViewin interfacejac.aspects.gui.View
refreshViewItem
public void refreshViewItem(jac.core.rtti.FieldItem field, jac.core.rtti.MethodItem method, java.lang.Object[] args)
- Description copied from interface:
jac.aspects.gui.View - Refreshes an item of the current view.
This method is automatically called by
ViewControlWrapperwhen the substance state that corresponds to the given field item changes.- Specified by:
refreshViewItemin interfacejac.aspects.gui.View
refreshView
public void refreshView()
- Description copied from interface:
jac.aspects.gui.View - Refreshes the whole view.
- Specified by:
refreshViewin interfacejac.aspects.gui.View
close
public void close()
- Description copied from interface:
jac.aspects.gui.View - This method is called by the system when the view is closed.
- Specified by:
closein interfacejac.aspects.gui.View
setFocus
public void setFocus(jac.core.rtti.FieldItem field, java.lang.Object extraOption)
- Description copied from interface:
jac.aspects.gui.View - Give the focus to a specified FieldItem.
- Specified by:
setFocusin interfacejac.aspects.gui.View
getSubstance
public java.lang.Object getSubstance()
- Get the value of substance.
- Specified by:
getSubstancein interfacejac.aspects.gui.View
setSubstance
public void setSubstance(jac.ide.Diagram v)
- Set the value of substance.
findClass
public ClassFigure findClass(jac.ide.Class _class)
findElement
public Figure findElement(jac.ide.TypedElement te)
findElement
public Figure findElement(jac.ide.ModelElement element)
init
public void init()
- Initializes the applet and creates its contents.
addViewChangeListener
public void addViewChangeListener(ViewChangeListener vsl)
removeViewChangeListener
public void removeViewChangeListener(ViewChangeListener vsl)
getStorageFormatManager
public StorageFormatManager getStorageFormatManager()
- Return the StorageFormatManager for this application.The StorageFormatManager is
used when storing and restoring Drawing from the file system.
createStorageFormatManager
public StorageFormatManager createStorageFormatManager()
createAttributesPanel
protected javax.swing.JPanel createAttributesPanel()
- Creates the attributes panel.
createAttributeChoices
protected void createAttributeChoices(javax.swing.JPanel panel)
- Creates the attribute choices. Override to add additional
choices.
createColorChoice
protected javax.swing.JComboBox createColorChoice(java.lang.String attribute)
- Creates the color choice for the given attribute.
createFontChoice
protected javax.swing.JComboBox createFontChoice()
- Creates the font choice. The choice is filled with
all the fonts supported by the toolkit.
createButtonPanel
protected javax.swing.JPanel createButtonPanel()
- Creates the buttons panel.
buildClassBar
void buildClassBar()
buildAspectBar
void buildAspectBar()
buildInstanceBar
void buildInstanceBar()
buildGroupBar
void buildGroupBar()
createButtons
protected void createButtons(javax.swing.JPanel panel)
- Creates the buttons shown in the buttons panel. Override to
add additional buttons.
createToolPalette
protected javax.swing.JPanel createToolPalette()
- Creates the tools palette.
createTools
protected void createTools(javax.swing.JPanel palette)
- Creates the tools. By default only the selection tool is added.
Override this method to add additional tools.
Call the inherited method to include the selection tool.
createSelectionTool
protected Tool createSelectionTool()
- Creates the selection tool used in this editor. Override to use
a custom selection tool.
createToolButton
protected ToolButton createToolButton(java.lang.String iconName, java.lang.String toolName, Tool tool)
- Creates a tool button with the given image, tool, and text
createDrawing
protected Drawing createDrawing()
- Creates the drawing used in this application.
You need to override this method to use a Drawing
subclass in your application. By default a standard
Drawing is returned.
createDrawingView
protected DrawingView createDrawingView()
- Creates the drawing view used in this application.
You need to override this method to use a DrawingView
subclass in your application. By default a standard
DrawingView is returned.
paletteUserSelected
public void paletteUserSelected(PaletteButton button)
- Handles a user selection in the palette.
paletteUserOver
public void paletteUserOver(PaletteButton button,
boolean inside)
- Handles when the mouse enters or leaves a palette button.
drawing
public Drawing drawing()
- Gets the current drawing.
tool
public Tool tool()
- Gets the current tool.
view
public DrawingView view()
- Gets the current drawing view.
views
public DrawingView[] views()
toolDone
public void toolDone()
- Sets the default tool of the editor.
figureSelectionChanged
public void figureSelectionChanged(DrawingView view)
- Handles a change of the current selection. Updates all
menu items that are selection sensitive.
viewSelectionChanged
public void viewSelectionChanged(DrawingView oldView,
DrawingView newView)
initDrawing
private void initDrawing()
setTool
private void setTool(Tool t,
java.lang.String name)
setSelected
private void setSelected(ToolButton button)
loadDrawing
protected void loadDrawing(java.lang.String param)
readDrawing
private void readDrawing(java.lang.String filename)
readFromStorableInput
private void readFromStorableInput(java.lang.String filename)
readFromObjectInput
private void readFromObjectInput(java.lang.String filename)
guessType
private java.lang.String guessType(java.lang.String file)
setupAttributes
private void setupAttributes()
setSimpleDisplayUpdate
protected void setSimpleDisplayUpdate()
setBufferedDisplayUpdate
protected void setBufferedDisplayUpdate()
showHelp
protected void showHelp()
- Shows a help page for the applet. The URL of the help
page is derived as follows: codeBase+appletClassname+Help.html"
setUndoManager
protected void setUndoManager(UndoManager newUndoManager)
getUndoManager
public UndoManager getUndoManager()
getVersionControlStrategy
protected VersionControlStrategy getVersionControlStrategy()
getRequiredVersions
public java.lang.String[] getRequiredVersions()
- Subclasses should override this method to specify to which versions of
JHotDraw they are compatible. A string array is returned so it is possible
to specify several version numbers of JHotDraw to which the application
is compatible with.
startSleeper
private void startSleeper()
- *** netscape browser work around ***
stopSleeper
private void stopSleeper()
save
public void save()
load
public void load()
promptOpen
public void promptOpen()
- Shows a file dialog and opens a drawing.
promptSave
public void promptSave()
saveDrawing
protected void saveDrawing(StorageFormat storeFormat,
java.lang.String file)
createOpenFileChooser
protected javax.swing.JFileChooser createOpenFileChooser()
showStatus
public void showStatus(java.lang.String msg)
- Description copied from class:
java.applet.Applet - Displays the specified message in the status window if that window
exists.
|
|||||||||
| Home >> All >> jac >> ide >> [ diagrams overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC