edu.byu.deg.OntologyEditor.shapes
Class RelationshipSetShape
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.byu.deg.OntologyEditor.shapes.DrawShape
edu.byu.deg.OntologyEditor.shapes.PlanarShape
edu.byu.deg.OntologyEditor.shapes.ConnectorShape
edu.byu.deg.OntologyEditor.shapes.RelationshipSetShape
- All Implemented Interfaces:
- Accessible, CustomCoordinatePlane, ImageObserver, ItemSelectable, MenuContainer, edu.byu.deg.osmx.OSMXElement.OSMXElementDeletionListener, edu.byu.deg.osmx.OSMXElementList.ListObserver, edu.byu.deg.osmx.PositionListener, Serializable, edu.byu.deg.osmx.TextChangeListener
- public class RelationshipSetShape
- extends ConnectorShape
- implements edu.byu.deg.osmx.TextChangeListener, edu.byu.deg.osmx.OSMXElementList.ListObserver
- See Also:
- Serialized Form
Fields inherited from class java.awt.Container |
|
Methods inherited from class edu.byu.deg.OntologyEditor.shapes.ConnectorShape |
anchorCenterPoint, delete, getCenterPoint, getPosition, initBorder, initCenterPoint, initLocation, initSize, locationChanged, locationChanged, recalculateCenterPoint, setLocation, setLocation, setLocationFromPosition, setPosition, setPosition, setSelected, storeInitialLocation, unanchorCenterPoint |
Methods inherited from class edu.byu.deg.OntologyEditor.shapes.DrawShape |
addItemListener, createStyle, drag, elementDeleted, elementPropertyChange, getAbsoluteCenterPoint, getBottomPoint, getConnectionPoint, getDefaultStyle, getElement, getFillColor, getFontColor, getFontFamily, getFontSize, getFontStyle, getLeftPoint, getLineColor, getLineWidth, getParentCanvas, getRightPoint, getRootCanvas, getSelectedObjects, getStyle, getTopPoint, isSelected, normalizeRect, removeItemListener, setSelected |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
MIN_DIAMOND_WIDTH
public static final int MIN_DIAMOND_WIDTH
- See Also:
- Constant Field Values
HIGH_LEVEL_SCALE_FACTOR
public static final double HIGH_LEVEL_SCALE_FACTOR
- See Also:
- Constant Field Values
relSet
protected edu.byu.deg.osmx.OSMXRelationshipSetType relSet
suppressDocEvents
protected boolean suppressDocEvents
nameText
protected JTextArea nameText
diamondPanel
protected edu.byu.deg.OntologyEditor.shapes.RelationshipSetShape.DiamondPanel diamondPanel
centerRegion
protected Ellipse2D centerRegion
RelationshipSetShape
public RelationshipSetShape(Container c,
edu.byu.deg.osmx.OSMXElement elem)
- Creates a new instance of RelationshipSetShape
initConnections
protected void initConnections()
- Specified by:
initConnections
in class ConnectorShape
addConnection
public void addConnection(edu.byu.deg.osmx.OSMXRelSetConnectionType conn)
initRelSet
protected void initRelSet()
initDiamond
protected void initDiamond()
repositionDiamond
protected void repositionDiamond()
repositionName
protected void repositionName()
centerPointMoved
protected void centerPointMoved()
- Overrides:
centerPointMoved
in class ConnectorShape
initNameArrow
protected void initNameArrow()
initName
protected void initName()
getOrigin
public Point getOrigin()
- Description copied from class:
DrawShape
- Returns the origin point of this shape.
- Specified by:
getOrigin
in interface CustomCoordinatePlane
- Overrides:
getOrigin
in class DrawShape
- Returns:
- The origin point of the shape.
- See Also:
CustomCoordinatePlane
elementAdded
public void elementAdded(edu.byu.deg.osmx.OSMXElement elem)
- Specified by:
elementAdded
in interface edu.byu.deg.osmx.OSMXElementList.ListObserver
elementRemoved
public void elementRemoved(edu.byu.deg.osmx.OSMXElement elem)
- Specified by:
elementRemoved
in interface edu.byu.deg.osmx.OSMXElementList.ListObserver
textChanged
public void textChanged(String newText)
- Specified by:
textChanged
in interface edu.byu.deg.osmx.TextChangeListener
updateArrow
public void updateArrow()
getRelationshipSet
protected edu.byu.deg.osmx.binding.RelationshipSetType getRelationshipSet()
contains
public boolean contains(int x,
int y)
- Overrides:
contains
in class ConnectorShape
contains
public boolean contains(Point point)
- Overrides:
contains
in class ConnectorShape
getBoundingBox
public Rectangle getBoundingBox()
- Description copied from class:
DrawShape
- Return the bounds of this shape (as opposed to the panel containing
this shape. Used, for example, to compute the drawing bounds for
EPS export purposes. Subclasses should override this method when
the containing panel bounds are not the same as the shape bounds.
This is the case with connectors, for example. Shapes need to be sure
to include text decorations (e.g., participation constraints,
relationship-set names) and special symbols when computing bounds.
- Overrides:
getBoundingBox
in class ConnectorShape
getStroke
public Stroke getStroke()
- Description copied from class:
DrawShape
- Returns the standard
Stroke
for drawing this shape's outline.
Override in subclasses if the normal outline should be drawn differently.
- Overrides:
getStroke
in class DrawShape
- Returns:
- The
Stroke
normally used to draw the shape.
paintComponent
public void paintComponent(Graphics g)
getCenterRegion
protected Ellipse2D getCenterRegion()
paintArrow
protected void paintArrow(Graphics g)
showDiamond
protected boolean showDiamond()
getHeadConnection
public ConnectionShape getHeadConnection()
- Specified by:
getHeadConnection
in class ConnectorShape
getTailConnection
public ConnectionShape getTailConnection()
- Specified by:
getTailConnection
in class ConnectorShape
masksConnectionsAt
public boolean masksConnectionsAt(Point pt)
- Specified by:
masksConnectionsAt
in class ConnectorShape
updateSelectionState
protected void updateSelectionState()
- Description copied from class:
DrawShape
- Invoked from
DrawShape.setSelected(boolean)
after the DrawShape.selected
flag has been
updated, this method allows subclasses to respond to the change in selection
state.
- Overrides:
updateSelectionState
in class ConnectorShape