|
||||||||||
| 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.acm.seguin.uml.line.LinedPanel
org.acm.seguin.uml.UMLPackage
public class UMLPackage
Draws a UML diagram for all the classes in a package
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
UMLPackage(PackageSummary packageSummary)
Constructor for UMLPackage |
|
UMLPackage(java.io.Reader input)
Constructor for UMLPackage |
|
UMLPackage(java.lang.String filename)
Constructor for UMLPackage |
|
| Method Summary | |
|---|---|
void |
clear()
Description of the Method |
void |
drag(java.awt.Point actual)
Dragging a segmented line point |
void |
drop()
User dropped an item |
protected UMLType |
find(java.lang.String id)
Find the type based on a id code |
protected SegmentedLine |
find(java.lang.String panel1,
java.lang.String panel2)
Find the type based on a id code |
protected UMLType |
findType(TypeSummary searching)
Find the type based on a summary |
java.io.File |
getFile()
Gets the File attribute of the UMLPackage object |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size |
java.lang.String |
getPackageName()
Gets the PackageName attribute of the UMLPackage object |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size |
PackageSummary |
getSummary()
Get the summary |
java.lang.String |
getTitle()
Determines the title |
UMLType[] |
getTypes()
Get the components that are UMLTypes |
void |
hit(java.awt.Point actual)
Determine what you hit |
boolean |
isDirty()
Gets the Dirty attribute of the UMLPackage object |
void |
jumpTo(TypeSummary type)
Tells the scrollbar to jump to this location |
void |
paint(java.awt.Graphics g)
Paint this object |
void |
print(java.awt.Graphics g,
int x,
int y)
Print this object |
void |
rearragePositions(int temperature,
int iterations,
double springStrength)
Uses a mixture of Simulated Annealling, springs along relationships and gravity (to position subclasses below their parents). |
void |
reload()
Reloads the UML class diagrams |
void |
removeAssociation(UMLField field)
Remove the association |
void |
reset()
Resets the scroll panes |
void |
resetPositions()
Initialises the positions of all types randomly. |
void |
save()
Save the files |
void |
scale(double value)
Sets the scale and resizes the panel. |
void |
setClassListPanel(ClassListPanel value)
Sets the class list panel |
void |
setDirty()
Sets the Dirty attribute of the UMLPackage object |
void |
setLoading(boolean value)
Sets the loading value |
void |
setScrollPane(javax.swing.JScrollPane value)
Sets the ScrollPane attribute of the UMLPackage object |
| Methods inherited from class org.acm.seguin.uml.line.LinedPanel |
|---|
add, add, deselectAll, getEndPointIterator, getEndPoints, getLineIterator, getLines, remove, remove, shift |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UMLPackage(PackageSummary packageSummary)
packageSummary - the summary of the packagepublic UMLPackage(java.lang.String filename)
filename - the name of the filepublic UMLPackage(java.io.Reader input)
input - the input stream| Method Detail |
|---|
public void setDirty()
public void setScrollPane(javax.swing.JScrollPane value)
value - The new ScrollPane valuepublic void setClassListPanel(ClassListPanel value)
value - the new listpublic void setLoading(boolean value)
value - The new Loading valuepublic java.lang.String getPackageName()
public UMLType[] getTypes()
public void scale(double value)
scale in class LinedPanelvalue - Description of Parameterpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class javax.swing.JComponentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic PackageSummary getSummary()
public java.io.File getFile()
public boolean isDirty()
public java.lang.String getTitle()
public void removeAssociation(UMLField field)
field - Description of Parameterpublic void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentg - the graphics object
public void print(java.awt.Graphics g,
int x,
int y)
g - the graphics objectx - the x coordinatey - the y coordinatepublic void reload()
public void clear()
clear in class LinedPanelpublic void hit(java.awt.Point actual)
hit in class LinedPanelactual - The hit locationpublic void drag(java.awt.Point actual)
drag in class LinedPanelactual - The mouse's current locationpublic void drop()
drop in class LinedPanel
public void save()
throws java.io.IOException
save in interface Saveablejava.io.IOException - Description of Exceptionpublic void jumpTo(TypeSummary type)
type - Description of Parameterprotected UMLType findType(TypeSummary searching)
searching - the variable we are searching for
protected UMLType find(java.lang.String id)
id - the code we are searching for
protected SegmentedLine find(java.lang.String panel1,
java.lang.String panel2)
panel1 - Description of Parameterpanel2 - Description of Parameter
public void reset()
public void resetPositions()
public void rearragePositions(int temperature,
int iterations,
double springStrength)
temperature - notional initial temperature of the diagram, a value of 2000 works well.iterations - number of times to reduce temperature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||