Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.memoire.dja
Class DjaGridInteractive  view DjaGridInteractive download DjaGridInteractive.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bycom.memoire.dja.DjaGrid
                  extended bycom.memoire.dja.DjaGridInteractive
All Implemented Interfaces:
DjaOptions, DjaOwner, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class DjaGridInteractive
extends DjaGrid


Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  boolean anchorsVisible_
           
private  boolean attachsVisible_
           
private  boolean dotsVisible_
           
private  boolean interactive_
           
private  DjaKeyListener kl_
           
private  DjaMouseListener ml_
           
private  DjaVector ss_
           
 
Fields inherited from class com.memoire.dja.DjaGrid
gl_
 
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.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.memoire.dja.DjaOptions
ABSOLUTE, anchorsColor, ANY, attachsColor, AUTO, BOTH, CENTER, closeX, closeY, controlsColor, defaultBigFont, defaultBoldFont, defaultPlainFont, defaultSmallFont, deltaX, deltaY, DISK_BG, DISK_EMPTY, DISK_FG, EAST, freesColor, handlesColor, HELPER, HORIZONTAL, LEFT, LEFT_TRIANGLE_BG, LEFT_TRIANGLE_EMPTY, LEFT_TRIANGLE_FG, LOSANGE_BG, LOSANGE_EMPTY, LOSANGE_FG, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_WEST, RELATIVE_ANCHOR, RELATIVE_ATTACH, RELATIVE_CONTROL, RELATIVE_NE, RELATIVE_NW, RELATIVE_SE, RELATIVE_SW, RELATIVE_TEXT_NE, RELATIVE_TEXT_NW, RELATIVE_TEXT_SE, RELATIVE_TEXT_SW, RIGHT, RIGHT_TRIANGLE_BG, RIGHT_TRIANGLE_EMPTY, RIGHT_TRIANGLE_FG, selectionBackground, selectionForeground, selectionTextColor, selectionZone, snap, SOUTH, SOUTH_EAST, SOUTH_WEST, SQUARE_BG, SQUARE_EMPTY, SQUARE_FG, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DjaGridInteractive()
           
DjaGridInteractive(boolean _interactive)
           
DjaGridInteractive(boolean _interactive, DjaVector _objects)
           
 
Method Summary
 void addSelection(DjaObject _o)
           
 void clearSelection()
           
 DjaVector cloneSelection()
           
protected  DjaKeyListener createInteractiveKeyListener()
           
protected  DjaMouseListener createInteractiveMouseListener()
           
 DjaVector getSelection()
           
 boolean isAnchorsVisible()
           
 boolean isAttachsVisible()
           
 boolean isDotsVisible()
           
 boolean isFocusTraversable()
          Tests whether or not this component is in the group that can be traversed using the keyboard traversal mechanism (such as the TAB key).
 boolean isInteractive()
           
static void main(java.lang.String[] args)
           
 void moveSelection(int _dx, int _dy)
           
 void paintComponent(java.awt.Graphics _g)
          Paint the component's body.
 void paintGrid(java.awt.Graphics _g)
           
protected  void processFocusEvent(java.awt.event.FocusEvent _evt)
          Called when a focus event is dispatched and component events are enabled.
 void putSelectionToBack()
           
 void putSelectionToFront()
           
 void removeSelection(DjaObject _o)
           
 void setAnchorsVisible(boolean _v)
           
 void setAttachsVisible(boolean _v)
           
 void setDotsVisible(boolean _v)
           
 void setInteractive(boolean _s)
           
 void setSelection(DjaObject _o)
           
 void setSelection(DjaVector _selection)
           
 void setSelectionToAll()
           
 
Methods inherited from class com.memoire.dja.DjaGrid
add, add, addEmbeds, addGridListener, avoidOverlap, avoidOverlap, enumerate, fireGridEvent, getGrid, getImage, getObjects, getOwner, getPreferredSize, insert, insert, paint, paintObjects, putToBack, putToFront, recenter, recenterIfNeeded, remove, remove, removeDependencies, removeEmbeds, removeGridListener, setObjects, toString
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, 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, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

anchorsVisible_

private boolean anchorsVisible_

attachsVisible_

private boolean attachsVisible_

dotsVisible_

private boolean dotsVisible_

ml_

private DjaMouseListener ml_

kl_

private DjaKeyListener kl_

ss_

private DjaVector ss_

interactive_

private boolean interactive_
Constructor Detail

DjaGridInteractive

public DjaGridInteractive()

DjaGridInteractive

public DjaGridInteractive(boolean _interactive)

DjaGridInteractive

public DjaGridInteractive(boolean _interactive,
                          DjaVector _objects)
Method Detail

isAnchorsVisible

public boolean isAnchorsVisible()
Overrides:
isAnchorsVisible in class DjaGrid

setAnchorsVisible

public void setAnchorsVisible(boolean _v)

isAttachsVisible

public boolean isAttachsVisible()
Overrides:
isAttachsVisible in class DjaGrid

setAttachsVisible

public void setAttachsVisible(boolean _v)

isDotsVisible

public boolean isDotsVisible()

setDotsVisible

public void setDotsVisible(boolean _v)

getSelection

public DjaVector getSelection()

setSelection

public void setSelection(DjaVector _selection)

clearSelection

public void clearSelection()

setSelectionToAll

public void setSelectionToAll()

setSelection

public void setSelection(DjaObject _o)

addSelection

public void addSelection(DjaObject _o)

removeSelection

public void removeSelection(DjaObject _o)

cloneSelection

public DjaVector cloneSelection()

moveSelection

public void moveSelection(int _dx,
                          int _dy)

putSelectionToFront

public void putSelectionToFront()

putSelectionToBack

public void putSelectionToBack()

createInteractiveMouseListener

protected DjaMouseListener createInteractiveMouseListener()

createInteractiveKeyListener

protected DjaKeyListener createInteractiveKeyListener()

isInteractive

public boolean isInteractive()
Overrides:
isInteractive in class DjaGrid

setInteractive

public void setInteractive(boolean _s)

isFocusTraversable

public boolean isFocusTraversable()
Description copied from class: java.awt.Component
Tests whether or not this component is in the group that can be traversed using the keyboard traversal mechanism (such as the TAB key).

Overrides:
isFocusTraversable in class DjaGrid

processFocusEvent

protected void processFocusEvent(java.awt.event.FocusEvent _evt)
Description copied from class: java.awt.Component
Called when a focus event is dispatched and component events are enabled. This method passes the event along to any listeners that are attached.


paintGrid

public void paintGrid(java.awt.Graphics _g)
Overrides:
paintGrid in class DjaGrid

paintComponent

public void paintComponent(java.awt.Graphics _g)
Description copied from class: javax.swing.JComponent
Paint the component's body. This usually means calling ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)>ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) 55 on the JComponent.ui>JComponent.ui 55 property of the component, if it is non-null. You may override this if you wish to customize the component's body-painting behavior. The component's body is painted first, before the border and children.

Overrides:
paintComponent in class DjaGrid

main

public static void main(java.lang.String[] args)