|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.objectweb.jac.aspects.gui.swing.AbstractView | +--org.objectweb.jac.ide.diagrams.DiagramView
Field Summary | |
protected Diagram |
diagram
|
static boolean |
init
|
Fields inherited from class org.objectweb.jac.aspects.gui.swing.AbstractView |
closed, height, width |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
DiagramView(ViewFactory factory,
DisplayContext context,
Object diagram)
|
Method Summary | |
void |
addClass(Class cl,
Point location)
Add a figure for a class at a given location |
void |
addViewChangeListener(CH.ifa.draw.framework.ViewChangeListener vsl)
|
void |
close(boolean validate)
Close this view. |
protected JPanel |
createButtonPanel()
Creates the buttons panel. |
protected void |
createButtons(JPanel panel)
Creates the buttons shown in the buttons panel. |
protected JComboBox |
createColorChoice(String attribute)
Creates the color choice for the given attribute. |
protected CH.ifa.draw.framework.Drawing |
createDrawing()
Creates the drawing used in this application. |
protected CH.ifa.draw.framework.DrawingView |
createDrawingView()
Creates the drawing view used in this application. |
void |
createRelation(Class source,
Class target,
RelationLinkFigure linkFigure,
boolean isAggregation)
Create a RelationLink between two classes. |
protected CH.ifa.draw.framework.Tool |
createSelectionTool()
Creates the selection tool used in this editor. |
protected JPanel |
createToolPalette()
Creates the tools palette. |
void |
dragEnter(DropTargetDragEvent e)
|
void |
dragExit(DropTargetEvent e)
|
void |
dragOver(DropTargetDragEvent e)
|
CH.ifa.draw.framework.Drawing |
drawing()
Gets the current drawing. |
void |
drop(DropTargetDropEvent e)
|
void |
dropActionChanged(DropTargetDragEvent e)
|
void |
figureSelectionChanged(CH.ifa.draw.framework.DrawingView view)
|
ClassFigure |
findClass(Class cl)
Find the figure of a given class in the default drawing. |
ClassFigure |
findClass(CH.ifa.draw.framework.Drawing drawing,
Class cl)
Find the figure of a given model element |
CH.ifa.draw.framework.Figure |
findElement(ModelElement element)
Find the figure of a given ModelElement |
CH.ifa.draw.framework.Figure |
findElement(TypedElement te)
Find the figure of a given TypedElement |
ModelElementFigure |
findFigure(CH.ifa.draw.framework.Drawing drawing,
ModelElement element)
Find the figure of a given model element. |
Diagram |
getDiagram()
|
String[] |
getRequiredVersions()
Subclasses should override this method to specify to which versions of JHotDraw they are compatible. |
Object |
getSubstance()
|
protected CH.ifa.draw.util.VersionControlStrategy |
getVersionControlStrategy()
|
void |
importInheritance(InheritanceLink inheritance)
Import an inheritance link in the diagram. |
void |
importRelation(RelationLink relation)
Import a relation in the diagram. |
void |
importRelations(Class cl)
Import all relations and inheritance links between a class with other classes on the diagram |
void |
init()
Initializes the applet and creates its contents. |
void |
load()
Initialize from the org.objectweb.jac.ide.Diagram |
void |
onAdd(Object substance,
CollectionItem collection,
Object value,
Object added,
Object param)
Upcalled when an item is added in a collection. |
void |
onChange(Object substance,
CollectionItem collection,
Object value,
Object param)
Upcalled when the collection is changed (with a set or other methods such as clear, removeAll, addAll, ...). |
void |
onRemove(Object substance,
CollectionItem collection,
Object value,
Object removed,
Object param)
Upcalled when an item is removed from a collection. |
void |
paletteUserOver(CH.ifa.draw.util.PaletteButton button,
boolean inside)
Handles when the mouse enters or leaves a palette button. |
void |
paletteUserSelected(CH.ifa.draw.util.PaletteButton button)
Handles a user selection in the palette. |
void |
removeViewChangeListener(CH.ifa.draw.framework.ViewChangeListener vsl)
|
void |
setCoord(int x,
int y)
|
void |
showStatus(String msg)
|
CH.ifa.draw.framework.Tool |
tool()
Gets the current tool. |
void |
toolDone()
Sets the default tool of the editor. |
String |
toString()
|
CH.ifa.draw.framework.DrawingView |
view()
Gets the current drawing view. |
CH.ifa.draw.framework.DrawingView[] |
views()
|
void |
viewSelectionChanged(CH.ifa.draw.framework.DrawingView oldView,
CH.ifa.draw.framework.DrawingView newView)
|
Methods inherited from class org.objectweb.jac.aspects.gui.swing.AbstractView |
equalsView, equalsView, getContext, getDescription, getFactory, getLabel, getMessage, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, invokeInContext, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParameters, setParentView, setSize, setStyle, setType, setViewBorder |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean init
protected Diagram diagram
Constructor Detail |
public DiagramView(ViewFactory factory, DisplayContext context, Object diagram)
Method Detail |
public void close(boolean validate)
View
close
in interface View
close
in class AbstractView
validate
- wether to validate any value contained in editors.public Object getSubstance()
public final Diagram getDiagram()
public void addClass(Class cl, Point location)
cl
- the class to add a figure forlocation
- where to put the class figurepublic void importRelations(Class cl)
cl
- the class to import relations forpublic void importRelation(RelationLink relation) throws Exception
relation
- the relation to import
Exception
- if both classes of the relation are not on the diagrampublic void importInheritance(InheritanceLink inheritance) throws Exception
inheritance
- the inheritance link to import
Exception
public void createRelation(Class source, Class target, RelationLinkFigure linkFigure, boolean isAggregation)
source
- start class of the linktarget
- end class of the linklinkFigure
- the figure that represents the relationisAggregation
- wether the relation is an aggregationpublic void drop(DropTargetDropEvent e)
drop
in interface DropTargetListener
public void dragEnter(DropTargetDragEvent e)
dragEnter
in interface DropTargetListener
public void dragExit(DropTargetEvent e)
dragExit
in interface DropTargetListener
public void dragOver(DropTargetDragEvent e)
dragOver
in interface DropTargetListener
public void dropActionChanged(DropTargetDragEvent e)
dropActionChanged
in interface DropTargetListener
public void figureSelectionChanged(CH.ifa.draw.framework.DrawingView view)
figureSelectionChanged
in interface CH.ifa.draw.framework.DrawingEditor
public ClassFigure findClass(Class cl)
cl
- the Class to search for
public ClassFigure findClass(CH.ifa.draw.framework.Drawing drawing, Class cl)
drawing
- the Drawing to search the figure intocl
- the Class to search for
public ModelElementFigure findFigure(CH.ifa.draw.framework.Drawing drawing, ModelElement element)
drawing
- the Drawing to search the figure intoelement
- the ModelElement to search for
public CH.ifa.draw.framework.Figure findElement(TypedElement te)
public CH.ifa.draw.framework.Figure findElement(ModelElement element)
public void init()
public void addViewChangeListener(CH.ifa.draw.framework.ViewChangeListener vsl)
addViewChangeListener
in interface CH.ifa.draw.framework.DrawingEditor
public void removeViewChangeListener(CH.ifa.draw.framework.ViewChangeListener vsl)
removeViewChangeListener
in interface CH.ifa.draw.framework.DrawingEditor
protected JComboBox createColorChoice(String attribute)
protected JPanel createButtonPanel()
protected void createButtons(JPanel panel)
panel
- the buttons panel.public void setCoord(int x, int y)
protected JPanel createToolPalette()
protected CH.ifa.draw.framework.Tool createSelectionTool()
protected CH.ifa.draw.framework.Drawing createDrawing()
protected CH.ifa.draw.framework.DrawingView createDrawingView()
public void paletteUserSelected(CH.ifa.draw.util.PaletteButton button)
paletteUserSelected
in interface CH.ifa.draw.util.PaletteListener
PaletteListener
public void paletteUserOver(CH.ifa.draw.util.PaletteButton button, boolean inside)
paletteUserOver
in interface CH.ifa.draw.util.PaletteListener
PaletteListener
public CH.ifa.draw.framework.Drawing drawing()
DrawingEditor
public CH.ifa.draw.framework.Tool tool()
tool
in interface CH.ifa.draw.framework.DrawingEditor
DrawingEditor
public CH.ifa.draw.framework.DrawingView view()
view
in interface CH.ifa.draw.framework.DrawingEditor
DrawingEditor
public CH.ifa.draw.framework.DrawingView[] views()
views
in interface CH.ifa.draw.framework.DrawingEditor
public void toolDone()
toolDone
in interface CH.ifa.draw.framework.DrawingEditor
DrawingEditor
public void viewSelectionChanged(CH.ifa.draw.framework.DrawingView oldView, CH.ifa.draw.framework.DrawingView newView)
protected CH.ifa.draw.util.VersionControlStrategy getVersionControlStrategy()
public String[] getRequiredVersions()
getRequiredVersions
in interface CH.ifa.draw.util.VersionRequester
public void load()
public void showStatus(String msg)
showStatus
in interface CH.ifa.draw.framework.DrawingEditor
public String toString()
toString
in class AbstractView
public void onChange(Object substance, CollectionItem collection, Object value, Object param)
CollectionUpdate
onChange
in interface CollectionUpdate
substance
- the object of which a field was updatedcollection
- the updated collectionvalue
- the new collectionparam
- extra dataViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void onAdd(Object substance, CollectionItem collection, Object value, Object added, Object param)
CollectionUpdate
onAdd
in interface CollectionUpdate
substance
- the object of which a collection was updatedcollection
- the updated collectionvalue
- the collection's valueadded
- the value added to the collectionparam
- extra data (e.g. index)ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void onRemove(Object substance, CollectionItem collection, Object value, Object removed, Object param)
CollectionUpdate
onRemove
in interface CollectionUpdate
substance
- the object of which a collection was updatedcollection
- the updated collectionvalue
- the collection's valueremoved
- the removed itemparam
- extra data (e.g. index)ViewControlWrapper.registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |