Object Adapter- Command |
Adapter/ConcreteCommand |
Adaptee/Receiver |
CH.ifa.draw.standard.AbstractFigure
adaptee: FigureChangeListener fListener
Request(): release, invalidate, changed
Target role is played by class CH.ifa.draw.framework.Figure
|
CH.ifa.draw.framework.FigureChangeListener
SpecificRequest(): figureRemoved, figureInvalidated, figureChanged
|
CH.ifa.draw.figures.RadiusHandle
adaptee: RoundRectangleFigure fOwner
Request(): locate
Target role is played by class CH.ifa.draw.standard.AbstractHandle
|
CH.ifa.draw.figures.RoundRectangleFigure
SpecificRequest(): getArc, displayBox
|
CH.ifa.draw.figures.GroupCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionZOrdered, drawing, clearSelection, addToSelection(Figure), checkDamage
|
CH.ifa.draw.figures.InsertImageCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): lastClick, add(Figure), clearSelection, addToSelection(Figure), checkDamage
|
CH.ifa.draw.figures.UngroupCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionElements, clearSelection, drawing, addToSelection(Figure), checkDamage
|
CH.ifa.draw.standard.AlignCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionElements, checkDamage
|
CH.ifa.draw.standard.BringToFrontCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionZOrdered, drawing, checkDamage
|
CH.ifa.draw.standard.ChangeAttributeCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionElements, checkDamage
|
CH.ifa.draw.standard.SendToBackCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): selectionZOrdered, drawing, checkDamage
|
CH.ifa.draw.standard.ToggleGridCommand
receiver: DrawingView fView
Execute(): execute
Command role is played by class CH.ifa.draw.util.Command
|
CH.ifa.draw.framework.DrawingView
Action(): getConstrainer, setConstrainer(PointConstrainer)
|
CH.ifa.draw.figures.TextFigure
adaptee: OffsetLocator fLocator
Request(): moveBy
Target role is played by class CH.ifa.draw.standard.AbstractFigure
|
CH.ifa.draw.standard.OffsetLocator
SpecificRequest(): moveBy
|
CH.ifa.draw.standard.AbstractTool
adaptee: DrawingView fView
Request(): activate, deactivate
Target role is played by class CH.ifa.draw.framework.Tool
|
CH.ifa.draw.framework.DrawingView
SpecificRequest(): clearSelection, setCursor(Cursor)
|
CH.ifa.draw.figures.LineConnection
adaptee: Connector fStart, Connector fEnd
Request(): updateConnection
Target role is played by class CH.ifa.draw.framework.ConnectionFigure
|
CH.ifa.draw.framework.Connector
SpecificRequest(): findStart(ConnectionFigure), findEnd(ConnectionFigure)
|
CH.ifa.draw.standard.AbstractConnector
adaptee: Figure fOwner
Request(): displayBox, containsPoint
Target role is played by class CH.ifa.draw.framework.Connector
|
CH.ifa.draw.framework.Figure
SpecificRequest(): displayBox, containsPoint
|
CH.ifa.draw.applet.DrawApplet
adaptee: ToolButton fDefaultToolButton
Request(): toolDone
Target role is played by class CH.ifa.draw.framework.DrawingEditor
adaptee: ToolButton fSelectedToolButton
Request(): paletteUserOver
Target role is played by class CH.ifa.draw.util.PaletteListener
|
CH.ifa.draw.standard.ToolButton
SpecificRequest(): name, tool
|
CH.ifa.draw.application.DrawApplication
adaptee: ToolButton fDefaultToolButton
Request(): toolDone
Target role is played by class CH.ifa.draw.framework.DrawingEditor
adaptee: ToolButton fSelectedToolButton
Request(): paletteUserOver
Target role is played by class CH.ifa.draw.util.PaletteListener
|
CH.ifa.draw.standard.ToolButton
SpecificRequest(): name, tool
|
CH.ifa.draw.standard.StandardDrawingView
adaptee: Drawing fDrawing
Request(): drawDrawing, setDrawing
Target role is played by class CH.ifa.draw.framework.DrawingView
adaptee: Drawing drawing()
Request(): add(Figure), remove(Figure), freezeView, unfreezeView, selectionZOrdered
|
CH.ifa.draw.framework.Drawing
SpecificRequest(): draw, removeDrawingChangeListener, addDrawingChangeListener
SpecificRequest(): add(Figure), remove(Figure), lock, unlock, figures
|
CH.ifa.draw.standard.StandardDrawingView
adaptee: DrawingEditor fEditor
Request(): tool
Target role is played by class CH.ifa.draw.framework.DrawingView
|
CH.ifa.draw.framework.DrawingEditor
SpecificRequest(): tool
|
CH.ifa.draw.contrib.PolygonHandle
adaptee: Locator fLocator
Request(): locate
Target role is played by class CH.ifa.draw.standard.AbstractHandle
|
CH.ifa.draw.framework.Locator
SpecificRequest(): locate(Figure)
|
CH.ifa.draw.standard.LocatorHandle
adaptee: Locator fLocator
Request(): locate
Target role is played by class CH.ifa.draw.standard.AbstractHandle
|
CH.ifa.draw.framework.Locator
SpecificRequest(): locate(Figure)
|
CH.ifa.draw.standard.ToolButton
adaptee: PaletteIcon fIcon
Request(): paintNormal, paintPressed, paintSelected
Target role is played by class CH.ifa.draw.util.PaletteButton
|
CH.ifa.draw.util.PaletteIcon
SpecificRequest(): normal, pressed, selected
|
CH.ifa.draw.standard.StandardDrawingView
adaptee: Painter fUpdateStrategy
Request(): paint(Graphics)
Target role is played by class CH.ifa.draw.framework.DrawingView
|
CH.ifa.draw.framework.Painter
SpecificRequest(): draw(Graphics, DrawingView)
|
CH.ifa.draw.standard.ReverseFigureEnumerator
adaptee: ReverseVectorEnumerator fEnumeration
Request(): hasMoreElements, nextElement, nextFigure
Target role is played by class CH.ifa.draw.framework.FigureEnumeration
|
CH.ifa.draw.util.ReverseVectorEnumerator
SpecificRequest(): hasMoreElements, nextElement
|
| Composite |
Component |
Composite |
| CH.ifa.draw.framework.Figure |
CH.ifa.draw.standard.CompositeFigure
children: Vector fFigures
Add(Component): add(Figure)
Remove(Component): remove(Figure)
Operation(): draw
|
| Decorator |
Component |
Decorator |
| CH.ifa.draw.framework.Locator |
CH.ifa.draw.standard.OffsetLocator
component: Locator fBase
Operation(): locate(Figure)
|
| CH.ifa.draw.framework.Figure |
CH.ifa.draw.standard.DecoratorFigure
component: Figure fComponent
Operation(): displayBox, basicDisplayBox, draw, handles
|
| CH.ifa.draw.framework.Tool |
CH.ifa.draw.standard.SelectionTool
component: Tool fChild
Operation(): mouseDown, mouseDrag, mouseUp
|
| Factory Method |
Creator |
CH.ifa.draw.framework.DrawingView
FactoryMethod(): selectionElements, getFigureSelection
ConcreteCreator role is played by class CH.ifa.draw.standard.StandardDrawingView
|
CH.ifa.draw.framework.Figure
FactoryMethod(): figures, decompose, connectorAt
ConcreteCreator role is played by class CH.ifa.draw.standard.AbstractFigure
|
| Observer |
Subject |
Observer |
CH.ifa.draw.standard.StandardDrawing
observers: Vector fListeners
Attach(Observer): addDrawingChangeListener
Detach(Observer): removeDrawingChangeListener
Notify(): figureInvalidated, figureRequestUpdate
|
CH.ifa.draw.framework.DrawingChangeListener
Update(): drawingInvalidated, drawingRequestUpdate
|
CH.ifa.draw.standard.StandardDrawingView
observers: Vector fBackgrounds, Vector fForegrounds
Attach(Observer): addBackground, addForeground
Detach(Observer): removeBackground, removeForeground
Notify(): drawAll -> drawPainters
|
CH.ifa.draw.framework.Painter
Update(): draw
|
CH.ifa.draw.standard.StandardDrawingView
observers: Vector fSelection
Attach(Observer): addToSelection
Detach(Observer): removeFromSelection
Notify(): keyPressed -> handleCursorKey -> moveSelection
|
CH.ifa.draw.framework.Figure
Update(): moveBy
|
| Prototype |
Client |
Prototype |
CH.ifa.draw.standard.ConnectionHandle
prototype: ConnectionFigure fPrototype
Operation(): createConnection
|
CH.ifa.draw.framework.Figure |
CH.ifa.draw.standard.ConnectionTool
prototype: ConnectionFigure fPrototype
Operation(): createConnection
|
CH.ifa.draw.framework.Figure |
CH.ifa.draw.standard.CreationTool
prototype: Figure fPrototype
Operation(): createFigure
|
CH.ifa.draw.framework.Figure |
| Singleton |
Singleton |
CH.ifa.draw.util.Clipboard
uniqueInstance: static Clipboard fgClipboard
|
CH.ifa.draw.util.Iconkit
uniqueInstance: static Iconkit fgIconkit
Instance(): instance
|
| State-Strategy |
Context |
State/Strategy |
| CH.ifa.draw.standard.AbstractFigure |
CH.ifa.draw.framework.FigureChangeListener |
CH.ifa.draw.standard.ChangeConnectionHandle
CH.ifa.draw.standard.ConnectionHandle
|
CH.ifa.draw.framework.Figure |
CH.ifa.draw.figures.GroupCommand
CH.ifa.draw.figures.InsertImageCommand
CH.ifa.draw.figures.UngroupCommand
CH.ifa.draw.standard.AlignCommand
CH.ifa.draw.standard.BringToFrontCommand
CH.ifa.draw.standard.ChangeAttributeCommand
CH.ifa.draw.standard.FigureTransferCommand
CH.ifa.draw.standard.SendToBackCommand
CH.ifa.draw.standard.ToggleGridCommand
|
CH.ifa.draw.framework.DrawingView |
CH.ifa.draw.applet.DrawApplet
CH.ifa.draw.application.DrawApplication
|
CH.ifa.draw.framework.Tool |
| CH.ifa.draw.standard.AbstractTool |
CH.ifa.draw.framework.DrawingView |
CH.ifa.draw.standard.ChangeConnectionHandle
CH.ifa.draw.standard.ConnectionHandle
|
CH.ifa.draw.framework.ConnectionFigure |
CH.ifa.draw.samples.javadraw.URLTool
CH.ifa.draw.standard.ConnectionTool
CH.ifa.draw.standard.CreationTool
CH.ifa.draw.standard.DragTracker
|
CH.ifa.draw.framework.Figure |
| CH.ifa.draw.standard.AbstractConnector |
CH.ifa.draw.framework.Figure |
| CH.ifa.draw.figures.LineConnection |
CH.ifa.draw.framework.Connector |
| CH.ifa.draw.util.CommandButton |
CH.ifa.draw.util.Command |
| CH.ifa.draw.standard.SelectionTool |
CH.ifa.draw.framework.Tool |
| CH.ifa.draw.util.PaletteButton |
CH.ifa.draw.util.PaletteListener |
| CH.ifa.draw.standard.StandardDrawingView |
CH.ifa.draw.framework.Drawing |
| CH.ifa.draw.figures.LineConnection |
CH.ifa.draw.framework.Connector |
| CH.ifa.draw.standard.StandardDrawingView |
CH.ifa.draw.framework.Drawing |
| CH.ifa.draw.standard.StandardDrawingView |
CH.ifa.draw.framework.DrawingEditor |
CH.ifa.draw.contrib.PolygonHandle
CH.ifa.draw.standard.LocatorHandle
|
CH.ifa.draw.framework.Locator |
| CH.ifa.draw.standard.ConnectionTool |
CH.ifa.draw.framework.ConnectionFigure |
| CH.ifa.draw.samples.javadraw.Animator |
CH.ifa.draw.framework.DrawingView |
CH.ifa.draw.applet.DrawApplet
CH.ifa.draw.application.DrawApplication
|
CH.ifa.draw.framework.Drawing |
| CH.ifa.draw.figures.TextTool |
CH.ifa.draw.standard.TextHolder |
| CH.ifa.draw.standard.StandardDrawingView |
CH.ifa.draw.framework.Painter |
| CH.ifa.draw.figures.PolyLineFigure |
CH.ifa.draw.figures.LineDecoration |
| CH.ifa.draw.standard.ChangeConnectionHandle |
CH.ifa.draw.framework.Connector |
| CH.ifa.draw.standard.StandardDrawingView |
CH.ifa.draw.framework.PointConstrainer |
| CH.ifa.draw.standard.HandleTracker |
CH.ifa.draw.framework.Handle |
| CH.ifa.draw.standard.ConnectionTool |
CH.ifa.draw.framework.Connector |
| CH.ifa.draw.standard.LocatorConnector |
CH.ifa.draw.framework.Locator |
| CH.ifa.draw.samples.javadraw.Animator |
CH.ifa.draw.util.Animatable |
| Template Method |
AbstractClass |
CH.ifa.draw.standard.AbstractFigure
TemplateMethod(): moveBy, displayBox(Point, Point), size, containsPoint, invalidate, center
PrimitiveOperation(): basicMoveBy, basicDisplayBox, displayBox()
moveBy -> {basicMoveBy }
displayBox(Point origin, Point corner) -> {basicDisplayBox }
size, containsPoint, invalidate, center -> {displayBox() }
|
CH.ifa.draw.standard.AbstractHandle
TemplateMethod(): displayBox
PrimitiveOperation(): locate
|
CH.ifa.draw.standard.ActionTool
TemplateMethod(): mouseDown
PrimitiveOperation(): action
|
CH.ifa.draw.standard.ChangeConnectionHandle
TemplateMethod(): source, invokeStart, invokeStep, invokeEnd
PrimitiveOperation(): target, disconnect, connect, setPoint
source -> {target }
invokeStart -> {target, disconnect }
invokeStep -> {setPoint }
invokeEnd -> {setPoint, connect }
|
CH.ifa.draw.util.PaletteButton
TemplateMethod(): paint
PrimitiveOperation(): paintBackground, paintPressed, paintSelected, paintNormal
|