public class GView extends XJView implements XJMenuItemDelegate, GTimerDelegate, GEventDelegate
| Modifier and Type | Class and Description |
|---|---|
class |
GView.MyContextualMenuListener |
XJView.DefaultFocusListener, XJView.DefaultKeyListener, XJView.DefaultMouseListener, XJView.DefaultMouseMotionListenerJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoAdjustSize |
static double |
DEFAULT_LINK_FLATENESS |
protected GViewDelegate |
delegate |
protected boolean |
drawBorder |
protected GEventManager |
eventManager |
protected GAlphaVariator |
focusAlphaVariator |
protected GTimer |
focusTimer |
protected Point |
lastMousePosition |
protected Set<GMagnetic> |
magnetics |
protected boolean |
magneticsVisible |
protected GElement |
rootElement |
static int |
SCROLL_TO_VISIBLE_MARGIN |
protected GAlphaVariator |
selectionAlphaVariator |
protected GTimer |
selectionTimer |
protected int |
sizeMargin |
protected boolean |
smoothGraphics |
protected float |
zoom |
strokeBold, strokeNormalaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
GView() |
handleKeyPressed, handleKeyTypedgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, 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, updateadd, 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, validateTreeaction, 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, transferFocusUpCyclepublic static final double DEFAULT_LINK_FLATENESS
public static final int SCROLL_TO_VISIBLE_MARGIN
protected GViewDelegate delegate
protected GEventManager eventManager
protected GElement rootElement
protected Point lastMousePosition
protected boolean smoothGraphics
protected float zoom
protected boolean autoAdjustSize
protected boolean drawBorder
protected int sizeMargin
protected GTimer selectionTimer
protected GTimer focusTimer
protected GAlphaVariator selectionAlphaVariator
protected GAlphaVariator focusAlphaVariator
protected boolean magneticsVisible
public void addDefaultEventManager()
public int defaultLinkShape()
public void setRootElement(GElement element)
public GElement getRootElement()
public GEventManager getEventManager()
public void setDelegate(GViewDelegate delegate)
public void setSmoothGraphics(boolean flag)
public boolean getSmoothGraphics()
public void setAutoAdjustSize(boolean flag)
public boolean getAutoAdjustSize()
public float getSelectionAlphaValue()
public float getFocusAlphaValue()
public Point getMousePosition(MouseEvent e)
public Point getLastMousePosition()
public void setDrawBorder(boolean flag)
public boolean getDrawBorder()
public void setZoom(float zoom)
public float getZoom()
public void setSizeMargin(int margin)
public void setRealSize(Dimension d)
public void setRealSize(int dx,
int dy)
public Dimension getRealSize()
public void autoAdjustSize()
public void centerAll()
public void setMagneticsVisible(boolean flag)
public boolean isMagneticsVisible()
public void toggleShowMagnetics()
public void createMagnetics()
public void showAndAjustPositionToMagnetics(Vector2D position)
public void hideAllMagnetics()
public void scrollElementToVisible(GElement element)
public void addSelectedElement(GElement element)
public void removeSelectedElement(GElement element)
public void addFocusedElement(GElement element)
public void removeFocusedElement(GElement element)
public BufferedImage getImage()
public String getEPS()
public void drawMagnetics(Graphics2D g2d)
public void paintComponent(Graphics g)
paintComponent in class JComponentpublic void addMenuItem(JPopupMenu menu, String title, int tag, Object object)
public JPopupMenu getContextualMenu(GElement element)
public GElement getElementAtMousePosition(MouseEvent e)
public void changeDone()
public void selectElementsInRect(int x,
int y,
int dx,
int dy)
public void selectAllElements(boolean select)
public void moveSelectedElements(double dx,
double dy)
public void timerFired(GTimer timer)
timerFired in interface GTimerDelegatepublic void processMouseEvent(MouseEvent e)
processMouseEvent in class JComponentpublic void handleMousePressed(MouseEvent e)
handleMousePressed in class XJViewpublic void handleMouseReleased(MouseEvent e)
handleMouseReleased in class XJViewpublic void handleMouseDragged(MouseEvent e)
handleMouseDragged in class XJViewpublic void handleMouseMoved(MouseEvent e)
handleMouseMoved in class XJViewpublic void handleMouseEntered(MouseEvent e)
handleMouseEntered in class XJViewpublic void handleMouseExited(MouseEvent e)
handleMouseExited in class XJViewpublic void handleMenuEvent(XJMenu menu, XJMenuItem item)
handleMenuEvent in interface XJMenuItemDelegatepublic void eventChangeDone()
eventChangeDone in interface GEventDelegatepublic void eventShouldRepaint()
eventShouldRepaint in interface GEventDelegatepublic GElement eventQueryElementAtPoint(Point p)
eventQueryElementAtPoint in interface GEventDelegatepublic GElement eventQueryRootElement()
eventQueryRootElement in interface GEventDelegatepublic void eventSouldSelectAllElements(boolean flag)
eventSouldSelectAllElements in interface GEventDelegatepublic void eventMoveSelectedElements(int dx,
int dy)
eventMoveSelectedElements in interface GEventDelegatepublic void eventCreateElement(Point p, boolean doubleclick)
eventCreateElement in interface GEventDelegatepublic void eventEditElement(GElement e)
eventEditElement in interface GEventDelegatepublic boolean eventCanCreateLink()
eventCanCreateLink in interface GEventDelegatepublic double eventLinkFlateness()
eventLinkFlateness in interface GEventDelegatepublic void eventCreateLink(GElement source, String sourceAnchorKey, GElement target, String targetAnchorKey, int shape, Point p)
eventCreateLink in interface GEventDelegatepublic void eventSelectElementsInRect(int x,
int y,
int dx,
int dy)
eventSelectElementsInRect in interface GEventDelegatepublic void eventAddFocusedElement(GElement element)
eventAddFocusedElement in interface GEventDelegatepublic void eventRemoveFocusedElement(GElement element)
eventRemoveFocusedElement in interface GEventDelegatepublic boolean eventIsSelectedElement(GElement element)
eventIsSelectedElement in interface GEventDelegateCopyright © 2013. All rights reserved.