|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLabel | +--pipe.dataLayer.PetriNetObject | +--pipe.dataLayer.PlaceTransitionObject
PlaceTransitionObject - Petri-Net PLace or Transition SuperClass - Abstract
Inner classes inherited from class javax.swing.JLabel |
javax.swing.JLabel.AccessibleJLabel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.ActionStandin, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardState |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
protected int |
boundsLeftoffset
LeftOffSet used for setBounds() |
protected int |
boundsTopoffset
TopOffSet used for setBounds() |
protected double |
height
Height of object |
private boolean |
isDragging
Used in the mouse events to control dragging |
protected java.lang.String |
name
Name |
protected java.lang.Double |
nameOffsetX
Name X-axis Offset |
protected java.lang.Double |
nameOffsetY
Name Y-axis Offset |
protected java.lang.Double |
positionX
X-axis Position |
protected java.lang.Double |
positionY
Y-axis Position |
protected double |
width
Width of object |
Fields inherited from class pipe.dataLayer.PetriNetObject |
color, id, movable, pnname |
Fields inherited from class javax.swing.JLabel |
accessibleIcon, defaultIcon, disabledIcon, disabledIconSet, horizontalAlignment, horizontalTextPosition, iconTextGap, LABELED_BY_PROPERTY, labelFor, mnemonic, text, uiClassID, verticalAlignment, verticalTextPosition |
Fields inherited from class javax.swing.JComponent |
_bounds, accessibleContext, actionMap, ACTIONMAP_CREATED, alignmentX, alignmentY, ANCESTOR_INPUTMAP_CREATED, ANCESTOR_USING_BUFFER, ancestorInputMap, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, CREATED_DOUBLE_BUFFER, flags, FOCUS_INPUTMAP_CREATED, focusInputMap, HAS_FOCUS, htmlKey, htmlView, inputVerifier, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, IS_PRINTING, IS_PRINTING_ALL, KEY_EVENTS_ENABLED, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, paintingChild, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, verifyInputWhenFocusTarget, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, WHEN_IN_FOCUSED_WINDOW_BINDINGS, WIF_INPUTMAP_CREATED, windowInputMap |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads, serialVersionUID |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, windowClosingException, windowListenerK, x, y |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
PlaceTransitionObject()
Create empty Petri-Net Object |
|
PlaceTransitionObject(double positionXInput,
double positionYInput,
java.awt.Color colorInput)
Create Petri-Net Object This constructor does all the work, the others just call it. |
|
PlaceTransitionObject(double positionXInput,
double positionYInput,
java.lang.String idInput,
java.awt.Color colorInput)
Create Petri-Net Object |
|
PlaceTransitionObject(double positionXInput,
double positionYInput,
java.lang.String idInput,
java.lang.String nameInput,
double nameOffsetXInput,
double nameOffsetYInput,
java.awt.Color colorInput)
Create Petri-Net Object |
Method Summary | |
int |
boundsHeight()
Returns the height bounds we want to use when initially creating the place on the gui |
int |
boundsWidth()
Returns the width bounds we want to use when initially creating the place on the gui |
void |
calculateBoundsOffsets()
Calculates the BoundsOffsets used for setBounds() method |
java.lang.String |
getId()
Get id |
java.lang.String |
getName()
Get name |
double |
getNameOffsetX()
Get X-axis offset for name position |
java.lang.Double |
getNameOffsetXObject()
Get X-axis offset for name position returns null if value not yet entered |
double |
getNameOffsetY()
Get Y-axis offset for name position |
java.lang.Double |
getNameOffsetYObject()
Get Y-axis offset for name position returns null if value not yet entered |
double |
getPositionX()
Get X-axis position |
java.lang.Double |
getPositionXObject()
Get X-axis position returns null if value not yet entered |
double |
getPositionY()
Get Y-axis position |
java.lang.Double |
getPositionYObject()
Get Y-axis position returns null if value not yet entered |
int |
leftOffset()
Returns the distance between the outside of the component to the centre, in order to position the centre of the place where the mouse clicks on the screen |
void |
mouseDragged(java.awt.event.MouseEvent e)
Implemented the moving of the objects - now done in the handler |
void |
mousePressed(java.awt.event.MouseEvent e)
Event handler for when the user presses down on the mouse, this is used in conjunction with mouseDragged and mouseReleased to implement the moving action |
void |
mouseReleased(java.awt.event.MouseEvent e)
Implemented the moving action - now moved into the handler |
void |
paintComponent(java.awt.Graphics g)
|
void |
setId(java.lang.String idInput)
Set id |
void |
setName(java.lang.String nameInput)
Set name |
void |
setNameOffsetX(double nameOffsetXInput)
Set X-axis offset for name position |
void |
setNameOffsetY(double nameOffsetYInput)
Set Y-axis offset for name position |
void |
setPositionX(double positionXInput)
Set X-axis position |
void |
setPositionY(double positionYInput)
Set Y-axis position |
int |
topOffset()
Returns the distance between the outside of the component to the centre, in order to position the centre of the place where the mouse clicks on the screen |
abstract void |
updateSize(java.awt.event.MouseEvent e)
Implemented in subclasses as involves some tailoring according to the shape |
Methods inherited from class pipe.dataLayer.PetriNetObject |
getColor, getMovable, getNameLabel, modify, mouseClicked, mouseEntered, mouseExited, mouseMoved, setColor, setMovable |
Methods inherited from class javax.swing.JLabel |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI, writeObject |
Methods inherited from class javax.swing.JComponent |
_paintImmediately, |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
protected java.lang.Double positionX
protected java.lang.Double positionY
protected java.lang.String name
protected java.lang.Double nameOffsetX
protected java.lang.Double nameOffsetY
protected double width
protected double height
protected int boundsTopoffset
protected int boundsLeftoffset
private boolean isDragging
Constructor Detail |
public PlaceTransitionObject(double positionXInput, double positionYInput, java.lang.String idInput, java.lang.String nameInput, double nameOffsetXInput, double nameOffsetYInput, java.awt.Color colorInput)
positionXInput
- X-axis PositionpositionYInput
- Y-axis PositionidInput
- Place idnameInput
- NamenameOffsetXInput
- Name X-axis PositionnameOffsetYInput
- Name Y-axis PositioncolorInput
- Colorpublic PlaceTransitionObject(double positionXInput, double positionYInput, java.lang.String idInput, java.awt.Color colorInput)
positionXInput
- X-axis PositionpositionYInput
- Y-axis PositionidInput
- Place idcolorInput
- Colorpublic PlaceTransitionObject(double positionXInput, double positionYInput, java.awt.Color colorInput)
positionXInput
- X-axis PositionpositionYInput
- Y-axis PositioncolorInput
- Colorpublic PlaceTransitionObject()
Method Detail |
public void setPositionX(double positionXInput)
positionXInput
- Double value for X-axis positionpublic void setPositionY(double positionYInput)
positionYInput
- Double value for Y-axis positionpublic void setId(java.lang.String idInput)
setId
in class PetriNetObject
idInput
- String value for Place id;public void setName(java.lang.String nameInput)
setName
in class java.awt.Component
nameInput
- String value for Place name;public void setNameOffsetX(double nameOffsetXInput)
nameOffsetXInput
- Double value for name X-axis offsetpublic void setNameOffsetY(double nameOffsetYInput)
nameOffsetYInput
- Double value for name Y-axis offsetpublic double getPositionX()
public double getPositionY()
public java.lang.String getId()
getId
in class PetriNetObject
public java.lang.String getName()
getName
in class java.awt.Component
public double getNameOffsetX()
public double getNameOffsetY()
public java.lang.Double getPositionXObject()
public java.lang.Double getPositionYObject()
public java.lang.Double getNameOffsetXObject()
public java.lang.Double getNameOffsetYObject()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in class PetriNetObject
e
- Mouse Eventpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in class PetriNetObject
e
- Mouse Eventpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in class PetriNetObject
e
- Mouse Eventpublic abstract void updateSize(java.awt.event.MouseEvent e)
updateSize
in class PetriNetObject
e
- Mouse Eventpublic void paintComponent(java.awt.Graphics g)
paintComponent
in class PetriNetObject
public int boundsWidth()
public int boundsHeight()
public int topOffset()
public int leftOffset()
public void calculateBoundsOffsets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |