org.diamondspin
Class DSPile

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JInternalFrame
                  extended by org.diamondspin.DSFrame
                      extended by org.diamondspin.DSPile
All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, Cloneable, EventListener, Accessible, RootPaneContainer, WindowConstants, DSElement

public class DSPile
extends DSFrame

Author:
vernier
See Also:
Serialized Form

Nested Class Summary
protected  class DSPile.DSPilerMover
          When folder move, adpat the slave to it Made by piler
protected  class DSPile.Position
           
 
Nested classes/interfaces inherited from class org.diamondspin.DSFrame
DSFrame.DSInternalFrameTitlePane, DSFrame.DSMenuBarProxy, DSFrame.FingerRotationMode, DSFrame.FingerRotationSpeed
 
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int AURA_LENGTH
           
protected  HashMap<DSFrame,Double> betaList
           
protected  Color[] colors
           
protected  boolean fanOnTwoFingers
           
protected  Point fip
           
protected  int fmode
           
protected  Point fop
           
protected  boolean freeze
           
protected  Point frip
           
protected  Point frop
           
protected  HashMap<DSFrame,DSPile.Position> fsave
           
protected  int fuser
           
protected  HashMap<DSFrame,DSPile.DSPilerMover> moverList
           
protected  boolean unpileOnDoubleTap
           
 
Fields inherited from class org.diamondspin.DSFrame
absoluteScale, absoluteShiftAngle, active, alpha, ALWAYS, annotatable, ANNOTATING, ANNOTATING_SINGLE_TIME, annotationOptions, backGlassPane, backPane, behavior, beta, betaAbsFlag, BETATED, biftpBottom, biftpTop, BLACK, BOTH, BOTTOM, CAST, center, CENTER, CENTERED, clickedComponent, clickedSlave, COLORBITS, corner_fold, corner_rotation, CORNER_SIZE, corners_resize_BR, corners_resize_TL, curvature, d, DARKER, diffAngle, DRAGGING, dsTabletopPane, dTopLeftCorner, ERASER, eraserIconPressed, ERASING, fingerRotatable, fingerRotationMode, fingerRotationSpeed, fixedPointForRotation, FOLDING, foldingManager, FOLLOWING_TWO_FINGERS, frontier, GLASS, globalPoint, grabCornerPoint, GRAY, idOwner, IN_BETWEEN, inertiaType, initDiagonal, inkIcon, inkIconPressed, INTELIGENT, invertiaCenter, invertiaMesh, jComboBox1, jViewport1, lastComponent, lastComponentUsed, lastRotationEvent, logoIcon, maximumScale, menubar, MIDDLE, minimumScale, mode, NONE, oldmenubar, OPPOSITE, previousMousePosition, previousPreviousMousePosition, RESIZING_BR, RESIZING_TL, rotatable, ROTATED, ROTATING, savedBeta, savedCenter, savedRotationCornerPosition, scale, scaleCorrection, serialVersionUID, shadow, shadowManager, shadowNeedRefresh, SHIFTED, slaveElementList, slavePosition, SMALL, thisDSFrame, titlebar, TOP, transparency, USER_COLOR, WAITING, zoomable, ZOOMING_BR, ZOOMING_TL
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
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 org.diamondspin.DSElement
HIGH_QUALITY, LOW_QUALITY
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DSPile(DSTabletopPane pane)
          Creates a new instance of DSPile
 
Method Summary
 void addSlaveElement(int pos, DSElement el)
          override the adding slave function to process stuff and update pile
 void cancelFan()
          cancel the fan mode and restore all the slave
 boolean containsFront(double x, double y)
           
 void fanOut()
          lay out slaves along a fan
 DSFrame findSlaveInFan(double b2)
          find the slave closest to the given angle
protected  void fireSlaveAddedEvent(DSElement el)
          Fire a slave adding event
protected  void fireSlaveReleasedEvent(DSElement el)
          Fire a slave release event
 void removeAllSlaveElement()
          override the removing all slaves function to process stuff and update pile
 void removeSlaveElement(DSElement el)
          override the removing slave function to process stuff and update pile
 void saveSlavePositions()
          save the postitions of slves so they can be restored after fan
 void setBeta(double b)
          change the angle around its own center, not the center of the polar coordinate system
 void setColors(Color[] cols)
           
 void setUnpileOnDoubleTap(boolean unpileOnDoubleTap)
           
 void updateSize()
          update pile size so it overlaps all its slaves
 
Methods inherited from class org.diamondspin.DSFrame
acceptSlave, acceptSlaveRelease, acceptSlavery, acceptSlaveryRelease, addDSElementListener, addDSElementPreListener, addFooterButton, addHeaderButton, addSlaveElement, askRefreshShadow, computeShadowPosition, contains, containsBack, createImage, disableSnaping, doesContain, doesContainBack, doesContainFront, fireDSElementCenterChangedEvent, fireDSelementContentRepainted, fireDSElementDemotedEvent, fireDSElementDroppedEvent, fireDSElementFoldedEvent, fireDSElementGrabbingEvent, fireDSElementMovedEvent, fireDSElementPreCenterChangedEvent, fireDSElementPreFoldedEvent, fireDSElementPreMovedEvent, fireDSElementPreResizedEvent, fireDSElementPreRotatedEvent, fireDSElementPreZoomedEvent, fireDSElementResizedEvent, fireDSElementRotatedEvent, fireDSElementZoomedEvent, foldTo, getAbsoluteScale, getAlpha, getBackClippingShape, getBackGlassPane, getBackImage, getBackOpacity, getBackPane, getBackPaneHeight, getBackPaneWidth, getBackTransform, getBehavior, getBeta, getBounds, getBounds, getCenter, getD, getDSElementListener, getDSElementPreListener, getDSTabletopPane, getFingerRotationMode, getFingerRotationSpeed, getFoldPoint, getFoldPoint1, getFoldPoint2, getFoldProportion, getFoldShapeBack, getFoldShapeFront, getFoldType, getFrontClippingShape, getFrontier, getFrontImage, getFrontOpacity, getGlobalClippingShape, getGraphics, getIDOwner, getInertiaType, getJMenuBar, getJMenuBarPosition, getLocationOnScreen, getMaximumScale, getMinimumScale, getMinimumSize, getMode, getParent, getScale, getShadow, getShadowAdditionnalAngle, getShadowClip, getShadowDistance, getShadowImage, getShadowPosition, getShadowSize, getSlaveElementList, getSlavePosition, getSlaveTransform, getSnapAngle, getTabletopPane, getTitleBarPosition, getTransform, getTransparency, getViewPort, grabElement, inertiaCenter, inertiaMesh, inversePoint, inversePoint, inversePointBack, inverseVector, inverseVectorBack, isActive, isADragObject, isAnnotatable, isBetaAbs, isClip, isCornerFold, isCornerRotation, isCorners, isCornersResizeBR, isCornersResizeTL, isFingerRotatable, isFoldable, isFolded, isFoldReverse, isMouseTarget, isMyDragObject, isRotatable, isShadowHighQuality, isShadowSource, isShowing, isZoomable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mousePressedInside, mousePressedInsideBack, mousePressedTestBack, mousePressedTestFront, mouseReleased, moveCenter, moveCenter, moveElementCenterTo, paint, paint, paintBackInternal, paintFoldCorner, paintInternal, paintMenu2, paintResizeCornerBR, paintResizeCornerTL, paintRotateCorner, paintShadow, paintShadowOld, paintSlaves, paintSoftBorder, redispatchEvent, refreshShadow, removeDSElementListener, removeDSElementPreListener, repaint, resetSlaveFrame, reshape, setAbsoluteScale, setActive, setAllCorners, setAlpha, setAlphaAndD, setAnnotable, setAnnotatable, setAnnotationOptions, setBackClippingShape, setBackGlassPane, setBackOpacity, setBackPane, setBehavior, setBeta, setBetaAbs, setCenter, setCenterTo, setCenterTo, setCornerFold, setCornerRotation, setCornersResizeBR, setCornersResizeTL, setD, setFingerRotatable, setFingerRotationMode, setFingerRotationSpeed, setFoldable, setFoldReverse, setFrontClippingShape, setFrontier, setFrontOpacity, setGlobalClippingShape, setIcon, setIDOwner, setInertiaType, setJMenuBar, setJMenuBarPosition, setMaximumScale, setMinimumScale, setMode, setPreferredSize, setRotatable, setRotationCorner, setScale, setShadow, setShadowAdditionnalAngle, setShadowClip, setShadowDistance, setShadowHighQuality, setShadowSource, setSize, setSize, setSlavePosition, setSlaveTransform, setSnapAngle, setTitleBarPosition, setTransparency, setViewPort, setZoomable, startAnnotating, toString, transformBackToLocal, transformPoint, transformPoint, transformVector, unfold, validate
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIconifiable, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, 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, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, 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, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.diamondspin.DSElement
getHeight, getWidth, isVisible, setVisible
 

Field Detail

AURA_LENGTH

public static final int AURA_LENGTH
See Also:
Constant Field Values

moverList

protected HashMap<DSFrame,DSPile.DSPilerMover> moverList

betaList

protected HashMap<DSFrame,Double> betaList

fsave

protected HashMap<DSFrame,DSPile.Position> fsave

colors

protected Color[] colors

unpileOnDoubleTap

protected boolean unpileOnDoubleTap

fmode

protected int fmode

fanOnTwoFingers

protected boolean fanOnTwoFingers

fuser

protected int fuser

fip

protected Point fip

fop

protected Point fop

frip

protected Point frip

frop

protected Point frop

freeze

protected boolean freeze
Constructor Detail

DSPile

public DSPile(DSTabletopPane pane)
Creates a new instance of DSPile

Method Detail

setColors

public void setColors(Color[] cols)

setUnpileOnDoubleTap

public void setUnpileOnDoubleTap(boolean unpileOnDoubleTap)

containsFront

public boolean containsFront(double x,
                             double y)
Overrides:
containsFront in class DSFrame

cancelFan

public void cancelFan()
cancel the fan mode and restore all the slave


saveSlavePositions

public void saveSlavePositions()
save the postitions of slves so they can be restored after fan


findSlaveInFan

public DSFrame findSlaveInFan(double b2)
find the slave closest to the given angle

Parameters:
b2 - the angle

fanOut

public void fanOut()
lay out slaves along a fan


updateSize

public void updateSize()
update pile size so it overlaps all its slaves


fireSlaveAddedEvent

protected void fireSlaveAddedEvent(DSElement el)
Fire a slave adding event


fireSlaveReleasedEvent

protected void fireSlaveReleasedEvent(DSElement el)
Fire a slave release event


addSlaveElement

public void addSlaveElement(int pos,
                            DSElement el)
override the adding slave function to process stuff and update pile

Overrides:
addSlaveElement in class DSFrame

removeSlaveElement

public void removeSlaveElement(DSElement el)
override the removing slave function to process stuff and update pile

Overrides:
removeSlaveElement in class DSFrame

removeAllSlaveElement

public void removeAllSlaveElement()
override the removing all slaves function to process stuff and update pile

Overrides:
removeAllSlaveElement in class DSFrame

setBeta

public void setBeta(double b)
Description copied from class: DSFrame
change the angle around its own center, not the center of the polar coordinate system

Specified by:
setBeta in interface DSElement
Overrides:
setBeta in class DSFrame
Parameters:
b - The new beta value


Copyright © 2006 Frederic Vernier(LIMSI) Chia Shen(MERL) Guillaume Besacier(LIMSI). All Rights Reserved.