|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.objectweb.jac.ide.diagrams.IDEDrawingView
Same as CH.ifa.draw.standard.StandardDrawingView, but with specific handling of "remove".
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static int |
MINIMUM_HEIGHT
|
static int |
MINIMUM_WIDTH
Scrolling increment |
static int |
SCROLL_INCR
|
static int |
SCROLL_OFFSET
|
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 | |
IDEDrawingView(CH.ifa.draw.framework.DrawingEditor editor)
Constructs the view. |
|
IDEDrawingView(CH.ifa.draw.framework.DrawingEditor editor,
int width,
int height)
|
Method Summary | |
CH.ifa.draw.framework.Figure |
add(CH.ifa.draw.framework.Figure figure)
Adds a figure to the drawing. |
void |
addAll(Vector figures)
Adds a vector of figures to the drawing. |
void |
addBackground(CH.ifa.draw.framework.Painter painter)
Adds a background. |
void |
addFigureSelectionListener(CH.ifa.draw.framework.FigureSelectionListener fsl)
Add a listener for selection changes. |
void |
addForeground(CH.ifa.draw.framework.Painter painter)
Adds a foreground. |
void |
addToSelection(CH.ifa.draw.framework.Figure figure)
Adds a figure to the current selection. |
void |
addToSelectionAll(CH.ifa.draw.framework.FigureEnumeration fe)
Adds a FigureEnumeration to the current selection. |
void |
addToSelectionAll(Vector figures)
Adds a vector of figures to the current selection. |
void |
autoscroll(Point p)
|
void |
checkDamage()
Refreshes the drawing if there is some accumulated damage |
void |
clearSelection()
Clears the current selection. |
protected Point |
constrainPoint(Point p)
Constrains a point to the current grid. |
void |
draw(Graphics g,
CH.ifa.draw.framework.FigureEnumeration fe)
Draws the given figures. |
void |
drawAll(Graphics g)
Draws the contents of the drawing view. |
void |
drawBackground(Graphics g)
Draws the background. |
void |
drawDrawing(Graphics g)
Draws the drawing. |
void |
drawHandles(Graphics g)
Draws the currently active handles. |
CH.ifa.draw.framework.Drawing |
drawing()
Gets the drawing. |
void |
drawingInvalidated(CH.ifa.draw.framework.DrawingChangeEvent e)
|
void |
drawingRequestUpdate(CH.ifa.draw.framework.DrawingChangeEvent e)
|
CH.ifa.draw.framework.DrawingEditor |
editor()
Gets the editor. |
boolean |
figureExists(CH.ifa.draw.framework.Figure inf,
CH.ifa.draw.framework.FigureEnumeration e)
Check existance of figure in the drawing |
CH.ifa.draw.framework.Handle |
findHandle(int x,
int y)
Finds a handle at the given coordinates. |
protected void |
fireSelectionChanged()
Informs that the current selection changed. |
void |
freezeView()
Freezes the view by acquiring the drawing lock. |
Insets |
getAutoscrollInsets()
|
Vector |
getConnectionFigures(CH.ifa.draw.framework.Figure inFigure)
Returns a vector of connectionfigures attached to this figure |
CH.ifa.draw.framework.PointConstrainer |
getConstrainer()
Gets the current constrainer. |
int |
getDefaultDNDActions()
|
CH.ifa.draw.framework.Painter |
getDisplayUpdate()
Sets the current display update strategy. |
CH.ifa.draw.framework.FigureSelection |
getFigureSelection()
Gets the current selection as a FigureSelection. |
Dimension |
getMinimumSize()
Gets the minimum dimension of the drawing. |
Dimension |
getPreferredScrollableViewportSize()
|
Dimension |
getPreferredSize()
Gets the preferred dimension of the drawing.. |
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
protected void |
handleCursorKey(int key)
Handles cursor keys by moving all the selected figures one grid point in the cursor direction. |
CH.ifa.draw.framework.FigureEnumeration |
insertFigures(CH.ifa.draw.framework.FigureEnumeration fe,
int dx,
int dy,
boolean bCheck)
Inserts a vector of figures and translates them by the given offset. |
boolean |
isFigureSelected(CH.ifa.draw.framework.Figure checkFigure)
Test whether a given figure is selected. |
boolean |
isFocusTraversable()
|
boolean |
isInteractive()
|
void |
keyPressed(KeyEvent e)
Handles key down events. |
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
Point |
lastClick()
Gets the position of the last click inside the view. |
protected void |
paintComponent(Graphics g)
Paints the drawing view. |
CH.ifa.draw.framework.Figure |
remove(CH.ifa.draw.framework.Figure figure)
Removes a figure from the drawing. |
void |
removeBackground(CH.ifa.draw.framework.Painter painter)
Removes a background. |
void |
removeFigureSelectionListener(CH.ifa.draw.framework.FigureSelectionListener fsl)
Remove a listener for selection changes. |
void |
removeForeground(CH.ifa.draw.framework.Painter painter)
Removes a foreground. |
void |
removeFromSelection(CH.ifa.draw.framework.Figure figure)
Removes a figure from the selection. |
void |
repairDamage()
|
Vector |
selection()
Gets the currently selected figures. |
int |
selectionCount()
Gets the number of selected figures. |
CH.ifa.draw.framework.FigureEnumeration |
selectionElements()
Gets an enumeration over the currently selected figures. |
Vector |
selectionZOrdered()
Gets the currently selected figures in Z order. |
void |
setConstrainer(CH.ifa.draw.framework.PointConstrainer c)
Sets the grid spacing that is used to constrain points. |
void |
setDisplayUpdate(CH.ifa.draw.framework.Painter updateStrategy)
Sets the current display update strategy. |
void |
setDrawing(CH.ifa.draw.framework.Drawing d)
Sets and installs another drawing in the view. |
void |
setEditor(CH.ifa.draw.framework.DrawingEditor editor)
Sets the view's editor. |
void |
toggleSelection(CH.ifa.draw.framework.Figure figure)
If a figure isn't selected it is added to the selection. |
CH.ifa.draw.framework.Tool |
tool()
Gets the current tool. |
String |
toString()
|
void |
unfreezeView()
Unfreezes the view by releasing the drawing lock. |
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 |
Methods inherited from interface CH.ifa.draw.framework.DrawingView |
createImage, getBackground, getGraphics, getSize, paint, setBackground, setCursor |
Methods inherited from interface java.awt.image.ImageObserver |
imageUpdate |
Field Detail |
public static final int MINIMUM_WIDTH
public static final int MINIMUM_HEIGHT
public static final int SCROLL_INCR
public static final int SCROLL_OFFSET
Constructor Detail |
public IDEDrawingView(CH.ifa.draw.framework.DrawingEditor editor)
public IDEDrawingView(CH.ifa.draw.framework.DrawingEditor editor, int width, int height)
Method Detail |
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface Scrollable
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface Scrollable
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
public void setEditor(CH.ifa.draw.framework.DrawingEditor editor)
setEditor
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.Tool tool()
tool
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.Drawing drawing()
drawing
in interface CH.ifa.draw.framework.DrawingView
public void setDrawing(CH.ifa.draw.framework.Drawing d)
setDrawing
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.DrawingEditor editor()
editor
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.Figure add(CH.ifa.draw.framework.Figure figure)
add
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.Figure remove(CH.ifa.draw.framework.Figure figure)
remove
in interface CH.ifa.draw.framework.DrawingView
public void addAll(Vector figures)
addAll
in interface CH.ifa.draw.framework.DrawingView
public boolean figureExists(CH.ifa.draw.framework.Figure inf, CH.ifa.draw.framework.FigureEnumeration e)
public CH.ifa.draw.framework.FigureEnumeration insertFigures(CH.ifa.draw.framework.FigureEnumeration fe, int dx, int dy, boolean bCheck)
insertFigures
in interface CH.ifa.draw.framework.DrawingView
public Vector getConnectionFigures(CH.ifa.draw.framework.Figure inFigure)
getConnectionFigures
in interface CH.ifa.draw.framework.DrawingView
public Dimension getMinimumSize()
getMinimumSize
in interface CH.ifa.draw.framework.DrawingView
public Dimension getPreferredSize()
getPreferredSize
in interface CH.ifa.draw.framework.DrawingView
public void setDisplayUpdate(CH.ifa.draw.framework.Painter updateStrategy)
setDisplayUpdate
in interface CH.ifa.draw.framework.DrawingView
Painter
public CH.ifa.draw.framework.Painter getDisplayUpdate()
getDisplayUpdate
in interface CH.ifa.draw.framework.DrawingView
Painter
public Vector selection()
selection
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.FigureEnumeration selectionElements()
selectionElements
in interface CH.ifa.draw.framework.DrawingView
public Vector selectionZOrdered()
selectionZOrdered
in interface CH.ifa.draw.framework.DrawingView
selection()
public int selectionCount()
selectionCount
in interface CH.ifa.draw.framework.DrawingView
public boolean isFigureSelected(CH.ifa.draw.framework.Figure checkFigure)
isFigureSelected
in interface CH.ifa.draw.framework.DrawingView
public void addToSelection(CH.ifa.draw.framework.Figure figure)
addToSelection
in interface CH.ifa.draw.framework.DrawingView
public void addToSelectionAll(Vector figures)
addToSelectionAll
in interface CH.ifa.draw.framework.DrawingView
public void addToSelectionAll(CH.ifa.draw.framework.FigureEnumeration fe)
addToSelectionAll
in interface CH.ifa.draw.framework.DrawingView
public void removeFromSelection(CH.ifa.draw.framework.Figure figure)
removeFromSelection
in interface CH.ifa.draw.framework.DrawingView
public void toggleSelection(CH.ifa.draw.framework.Figure figure)
toggleSelection
in interface CH.ifa.draw.framework.DrawingView
public void clearSelection()
clearSelection
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.FigureSelection getFigureSelection()
getFigureSelection
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.Handle findHandle(int x, int y)
findHandle
in interface CH.ifa.draw.framework.DrawingView
protected void fireSelectionChanged()
public Point lastClick()
lastClick
in interface CH.ifa.draw.framework.DrawingView
public void setConstrainer(CH.ifa.draw.framework.PointConstrainer c)
setConstrainer
in interface CH.ifa.draw.framework.DrawingView
public CH.ifa.draw.framework.PointConstrainer getConstrainer()
getConstrainer
in interface CH.ifa.draw.framework.DrawingView
protected Point constrainPoint(Point p)
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
protected void handleCursorKey(int key)
public void checkDamage()
checkDamage
in interface CH.ifa.draw.framework.DrawingView
public void repairDamage()
repairDamage
in interface CH.ifa.draw.framework.DrawingView
public void drawingInvalidated(CH.ifa.draw.framework.DrawingChangeEvent e)
drawingInvalidated
in interface CH.ifa.draw.framework.DrawingChangeListener
public void drawingRequestUpdate(CH.ifa.draw.framework.DrawingChangeEvent e)
drawingRequestUpdate
in interface CH.ifa.draw.framework.DrawingChangeListener
protected void paintComponent(Graphics g)
Painter
public void drawAll(Graphics g)
drawAll
in interface CH.ifa.draw.framework.DrawingView
public void draw(Graphics g, CH.ifa.draw.framework.FigureEnumeration fe)
draw
in interface CH.ifa.draw.framework.DrawingView
public void drawHandles(Graphics g)
drawHandles
in interface CH.ifa.draw.framework.DrawingView
public void drawDrawing(Graphics g)
drawDrawing
in interface CH.ifa.draw.framework.DrawingView
public void drawBackground(Graphics g)
drawBackground
in interface CH.ifa.draw.framework.DrawingView
public void addBackground(CH.ifa.draw.framework.Painter painter)
public void removeBackground(CH.ifa.draw.framework.Painter painter)
public void removeForeground(CH.ifa.draw.framework.Painter painter)
public void addForeground(CH.ifa.draw.framework.Painter painter)
public void freezeView()
freezeView
in interface CH.ifa.draw.framework.DrawingView
Drawing.lock()
public void unfreezeView()
unfreezeView
in interface CH.ifa.draw.framework.DrawingView
Drawing.unlock()
public boolean isFocusTraversable()
public boolean isInteractive()
isInteractive
in interface CH.ifa.draw.framework.DrawingView
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void addFigureSelectionListener(CH.ifa.draw.framework.FigureSelectionListener fsl)
addFigureSelectionListener
in interface CH.ifa.draw.framework.DrawingView
fsl
- jhotdraw.framework.FigureSelectionListenerpublic void removeFigureSelectionListener(CH.ifa.draw.framework.FigureSelectionListener fsl)
removeFigureSelectionListener
in interface CH.ifa.draw.framework.DrawingView
fsl
- jhotdraw.framework.FigureSelectionListenerpublic int getDefaultDNDActions()
public void autoscroll(Point p)
autoscroll
in interface Autoscroll
public Insets getAutoscrollInsets()
getAutoscrollInsets
in interface Autoscroll
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |