|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JInternalFrame org.diamondspin.DSFrame
public class DSFrame
A DSFrame is an element as close as possible as an existing java frame. It was not possible to overload a JFrame or JWindow
because the repaint method doesn't repaint the border and doesn't allow transformations. We used then a JInternalFrame instead which is a
little bit different but can contain as well any kind of swing content. The menubar is not implemented yet. If you are interested to make
it, it should be similar to what we did for DSCombobox.
In addition to JInternalFrame the DSFrame tends to implement rotating, zooming and peeling
DSFrame with Resizing, Zoomimg and rotating corner. Old shadow style | Folding corner, no shadow and red ink annotation | Folded DSFrame with cast shadow |
Copyright 2002-2009 DiamondSpin project. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and the following three paragraphs appear in all copies. To request Permission to incorporate this software into commercial products contact one of the authors of the project.
IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
Nested Class Summary | |
---|---|
protected class |
DSFrame.DSInternalFrameTitlePane
We overrided InternalFrameTitlePane in used in SWING to be able to add buttons in it |
protected class |
DSFrame.DSMenuBarProxy
|
static class |
DSFrame.FingerRotationMode
|
static class |
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 | |
---|---|
protected double |
absoluteScale
absolute scale relative to original element size useful for size sharing mode |
protected float |
absoluteShiftAngle
|
protected boolean |
active
if the component is active or not |
protected double |
alpha
Angle from the right horitontal direction. |
static int |
ALWAYS
|
protected boolean |
annotatable
|
static int |
ANNOTATING
|
static int |
ANNOTATING_SINGLE_TIME
|
protected int |
annotationOptions
|
protected Container |
backGlassPane
|
protected Container |
backPane
|
protected int |
behavior
behavior is how element behave in the polar coordiate system when dragged. |
protected double |
beta
Angle around its center ! 0-2PI |
protected int |
betaAbsFlag
|
static int |
BETATED
|
protected DSFrame.DSInternalFrameTitlePane |
biftpBottom
|
protected DSFrame.DSInternalFrameTitlePane |
biftpTop
a title bar we can customize |
static int |
BLACK
|
static int |
BOTH
|
static int |
BOTTOM
|
static int |
CAST
|
protected Point |
center
The center around which the frame rotate |
static int |
CENTER
|
static int |
CENTERED
different behaviors of dsframe |
protected Component |
clickedComponent
The clicked component because it is this one which should receive the mouserelease! |
protected DSElement |
clickedSlave
|
protected static int |
COLORBITS
|
protected boolean |
corner_fold
|
protected boolean |
corner_rotation
|
static int |
CORNER_SIZE
the size in pixels of the colored corners |
protected boolean |
corners_resize_BR
|
protected boolean |
corners_resize_TL
if the corners for rotation, resize or fold are displayed |
protected double |
curvature
|
protected double |
d
Distance to the center of the circular layout 0.0-1.0 |
static int |
DARKER
|
protected double |
diffAngle
|
static int |
DRAGGING
|
DSTabletopPane |
dsTabletopPane
everything is diplayed in a DSTabletopPane. |
protected Point |
dTopLeftCorner
Where the mouse cursor grabbed the window (0,0 only if the user clicks in the first pixel of the component !) |
static int |
ERASER
|
protected static ImageIcon |
eraserIconPressed
|
static int |
ERASING
|
protected boolean |
fingerRotatable
|
protected DSFrame.FingerRotationMode |
fingerRotationMode
|
protected DSFrame.FingerRotationSpeed |
fingerRotationSpeed
|
protected int |
fixedPointForRotation
|
static int |
FOLDING
|
protected DSFoldingManager |
foldingManager
|
static int |
FOLLOWING_TWO_FINGERS
|
protected int |
frontier
|
static int |
GLASS
|
protected Point2D.Double |
globalPoint
|
protected Point2D.Double |
grabCornerPoint
|
static int |
GRAY
|
protected int |
idOwner
the user who owns this object |
static int |
IN_BETWEEN
|
protected int |
inertiaType
|
protected double |
initDiagonal
the intial length of the element's diagonal, used for comparison to determine absolute scale |
protected static ImageIcon |
inkIcon
|
protected static ImageIcon |
inkIconPressed
|
static int |
INTELIGENT
|
protected Point2D.Double |
invertiaCenter
|
protected Point2D.Double[][] |
invertiaMesh
|
protected DSJComboBox |
jComboBox1
because if a popup component is used we must keep track of it to redispatch events to the popup content. |
protected JViewport |
jViewport1
scrollable window should return their JViewport here. |
protected Component |
lastComponent
The last component concerned by a mouse event. |
protected Component |
lastComponentUsed
|
DSTouchEvent |
lastRotationEvent
|
protected static ImageIcon |
logoIcon
|
protected double |
maximumScale
|
protected DSFrame.DSMenuBarProxy |
menubar
|
static int |
MIDDLE
|
protected double |
minimumScale
|
protected int |
mode
|
static int |
NONE
As a DSElement this element can dispatch DSElement events to registered listeners |
protected DSMenuBar |
oldmenubar
|
static int |
OPPOSITE
|
protected Point |
previousMousePosition
|
protected Point |
previousPreviousMousePosition
|
static int |
RESIZING_BR
|
static int |
RESIZING_TL
|
protected boolean |
rotatable
|
static int |
ROTATED
|
static int |
ROTATING
|
protected double |
savedBeta
|
protected Point |
savedCenter
|
protected Point2D.Double |
savedRotationCornerPosition
|
protected double |
scale
scale factor to resize the element at low level (pixel by pixel). |
protected double |
scaleCorrection
Even if a document has its own scale, it can be affected by a global scale effect (blackhole, etc.) Like alpha which is also dependant of the global angle to know where the element is on the screen Min - 1.0 During resizing scale factor is changed and must be saved |
static int |
serialVersionUID
|
protected int |
shadow
|
protected DSShadowManager |
shadowManager
|
protected boolean |
shadowNeedRefresh
|
static int |
SHIFTED
|
protected ArrayList<DSElement> |
slaveElementList
|
protected int |
slavePosition
TOP, BOTTOM or IN_BETWEEN |
static int |
SMALL
|
protected DSFrame |
thisDSFrame
|
protected int |
titlebar
NONE, TOP, BOTTOM or BOTH |
static int |
TOP
|
protected int |
transparency
|
static int |
USER_COLOR
|
static int |
WAITING
|
protected boolean |
zoomable
|
static int |
ZOOMING_BR
|
static int |
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 | |
---|---|
DSFrame(DSTabletopPane pane)
Constructor without title |
|
DSFrame(String title_Arg,
DSTabletopPane dsTabletopPane_Arg)
Constructor with title |
Method Summary | |
---|---|
boolean |
acceptSlave(DSElement dsElement)
tells if the given element can be slave of me |
boolean |
acceptSlaveRelease(DSElement dsElement)
tells if I accept the slave to release by themselves |
boolean |
acceptSlavery(DSElement dsElement)
tells if I accept to become the slave of the given element |
boolean |
acceptSlaveryRelease()
tells if I accept to be released |
void |
addDSElementListener(DSElementListener listener)
register a elementlistener who want to know when an element is resized, rotated, moved , etc. |
void |
addDSElementPreListener(DSElementPreListener listener)
|
void |
addFooterButton(AbstractButton b)
|
void |
addHeaderButton(AbstractButton b)
|
void |
addSlaveElement(DSElement dsElement)
handle a list of slave elements. |
void |
addSlaveElement(int pos,
DSElement dsElement)
|
void |
askRefreshShadow()
ask for a repaint of the cast shadow bitmap |
void |
computeShadowPosition()
|
boolean |
contains(int x,
int y)
|
boolean |
containsBack(double x,
double y)
|
boolean |
containsFront(double x,
double y)
|
Image |
createImage(int Width_Arg,
int Height_Arg)
Overload this annoying function which is not relevant anymore |
void |
disableSnaping()
|
boolean |
doesContain(double x,
double y)
Find whether a given cartesian point falls within this element |
boolean |
doesContainBack(double x,
double y)
Find whether a given cartesian point falls within the back of this element |
boolean |
doesContainFront(double x,
double y)
Find whether a given cartesian point falls within this element's front side |
void |
fireDSElementCenterChangedEvent(int x,
int y,
int cause)
Fire the events to the suscribers |
void |
fireDSelementContentRepainted(int cause)
Fire a repainted event to the suscribers |
void |
fireDSElementDemotedEvent()
Fire a demote event |
void |
fireDSElementDroppedEvent(int type)
Fire the events to the suscribers |
void |
fireDSElementFoldedEvent(double fangle,
double fproportion,
int cause)
Fire the events to the suscribers |
boolean |
fireDSElementGrabbingEvent(int type)
Fire the grab events to the suscribers before it is taken into account so they can cancel it |
void |
fireDSElementMovedEvent(double distance_Arg,
double tangle,
int cause)
Fire the events to the suscribers |
boolean |
fireDSElementPreCenterChangedEvent(int x,
int y,
int cause)
Fire the set center events to the suscribers before it is taken into account so they can cancel it |
boolean |
fireDSElementPreFoldedEvent(double fangle,
double fproportion,
int cause)
Fire the events to the suscribers |
boolean |
fireDSElementPreMovedEvent(double distance_Arg,
double tangle,
int cause)
Fire the move events to the suscribers before it is taken into account so they can cancel it |
boolean |
fireDSElementPreResizedEvent(int w,
int h,
int cause)
Fire the resize events to the suscribers before it is taken into account so they can cancel it |
boolean |
fireDSElementPreRotatedEvent(double b,
int cause)
Fire the events to the suscribers |
boolean |
fireDSElementPreZoomedEvent(double scale,
int cause)
Fire the events to the suscribers |
void |
fireDSElementResizedEvent(int w,
int h,
int cause)
Fire the events to the suscribers |
void |
fireDSElementRotatedEvent(double b,
int cause)
Fire the events to the suscribers |
void |
fireDSElementZoomedEvent(double s,
int cause)
Fire a zoom event to the suscribers |
void |
foldTo(Point2D.Double pt)
fold to the given point |
double |
getAbsoluteScale()
get the absolute scale of the document. |
double |
getAlpha()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
Shape |
getBackClippingShape()
|
Container |
getBackGlassPane()
|
BufferedImage |
getBackImage()
|
float |
getBackOpacity()
|
Container |
getBackPane()
|
int |
getBackPaneHeight()
|
int |
getBackPaneWidth()
|
AffineTransform |
getBackTransform()
|
int |
getBehavior()
|
double |
getBeta()
The angle around its center |
Rectangle |
getBounds()
Deprecated. The bounds are (0,0)=top-left based, and not local center based. They should not be used unless you really know what you do. |
Rectangle |
getBounds(Rectangle rv)
Deprecated. |
Point |
getCenter()
|
double |
getD()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
DSElementListener[] |
getDSElementListener()
|
DSElementPreListener[] |
getDSElementPreListener()
|
DSTabletopPane |
getDSTabletopPane()
|
DSFrame.FingerRotationMode |
getFingerRotationMode()
|
DSFrame.FingerRotationSpeed |
getFingerRotationSpeed()
|
Point2D.Double |
getFoldPoint()
|
Point2D.Double |
getFoldPoint1()
|
Point2D.Double |
getFoldPoint2()
|
double |
getFoldProportion()
|
Shape |
getFoldShapeBack()
|
Shape |
getFoldShapeFront()
|
int |
getFoldType()
|
Shape |
getFrontClippingShape()
|
int |
getFrontier()
|
BufferedImage |
getFrontImage()
|
float |
getFrontOpacity()
|
Shape |
getGlobalClippingShape()
|
Graphics |
getGraphics()
Overload this annoying function which is not relevant anymore |
int |
getIDOwner()
get the id of the user who owns this element |
int |
getInertiaType()
|
JMenuBar |
getJMenuBar()
|
int |
getJMenuBarPosition()
|
Point |
getLocationOnScreen()
Overload this annoying function which is not relevant anymore |
double |
getMaximumScale()
|
double |
getMinimumScale()
|
Dimension |
getMinimumSize()
|
int |
getMode()
|
Container |
getParent()
Overload this annoying function which is not relevant anymore |
double |
getScale()
The degrees of freedom of the DSElements are their distance to the center, their angle comparing to the right direction (from center to the ful right), a scale (for zooming features) and |
int |
getShadow()
|
double |
getShadowAdditionnalAngle()
|
Shape |
getShadowClip()
|
int |
getShadowDistance()
|
BufferedImage |
getShadowImage()
|
Point |
getShadowPosition()
|
int |
getShadowSize()
|
ArrayList<DSElement> |
getSlaveElementList()
|
int |
getSlavePosition()
|
AffineTransform |
getSlaveTransform()
|
double |
getSnapAngle()
|
DSTabletopPane |
getTabletopPane()
|
int |
getTitleBarPosition()
|
AffineTransform |
getTransform()
The matrix decribing how this element is transformed before rendering |
int |
getTransparency()
|
JViewport |
getViewPort()
Gets the viewPort attribute of the DSFrame object |
boolean |
grabElement(int dX_Arg,
int dY_Arg)
Make the element to been dragged. |
Point2D.Double |
inertiaCenter()
|
Point2D.Double[][] |
inertiaMesh()
|
Point2D.Double |
inversePoint(Point2D.Double p)
take a point in the general coordinate system and transform it in a local coordinate system |
Point2D.Float |
inversePoint(Point2D.Float p)
take a point in the general coordinate system and transform it in a local coordinate system |
protected Point2D.Double |
inversePointBack(Point2D.Double p)
take a point in the general coordinate system and transform it in a local coordinate system ... |
Point |
inverseVector(Point v)
take a vector in the global tabletop coordinate system and transform it in the local coordinate system |
protected Point2D.Double |
inverseVectorBack(Point2D.Double Point_Arg)
take a vector in the general coordinate system and transform it in a local coordinate system ... |
boolean |
isActive()
in the centralized architecture we have some elements are in the views and one or few element are handled directly by the DSTabletopPane as drag&dropped elements. |
boolean |
isADragObject()
|
boolean |
isAnnotatable()
Gets the annotatable attribute of the DSFrame object |
boolean |
isBetaAbs()
indicate how to use beta. |
boolean |
isClip()
|
boolean |
isCornerFold()
|
boolean |
isCornerRotation()
|
boolean |
isCorners()
Deprecated. The corners are now managed individually |
boolean |
isCornersResizeBR()
|
boolean |
isCornersResizeTL()
|
boolean |
isFingerRotatable()
|
boolean |
isFoldable()
|
boolean |
isFolded()
|
boolean |
isFoldReverse()
|
boolean |
isMouseTarget(MouseEvent event)
tells if the mouse event occurred within this element without actually causing the event to take effect yet |
boolean |
isMyDragObject()
|
boolean |
isRotatable()
|
boolean |
isShadowHighQuality()
|
boolean |
isShadowSource()
|
boolean |
isShowing()
to foul AWT and make it believe this component is showing on screen and must be properly initialized |
boolean |
isZoomable()
|
void |
mouseClicked(MouseEvent event)
click listener to detect dbl click on corners -> reset to normal |
void |
mouseDragged(MouseEvent event)
Handle a mouse cursor drag event or more the frame if in DRAGGING MODE |
void |
mouseEntered(MouseEvent event)
Description of the Method |
void |
mouseExited(MouseEvent event)
Description of the Method |
void |
mouseMoved(MouseEvent event)
Handle a mouse cursor move event. |
void |
mousePressed(MouseEvent event)
Handle a mouse button press event |
protected void |
mousePressedInside(MouseEvent event,
Point2D.Double mousePosition_arg)
handle an internal mouse press event |
protected void |
mousePressedInsideBack(MouseEvent event,
Point2D.Double localBackPoint)
|
protected void |
mousePressedTestBack(MouseEvent event)
|
protected void |
mousePressedTestFront(MouseEvent event)
|
void |
mouseReleased(MouseEvent event)
Handle a mouse button release event |
void |
moveCenter(Point c)
Set the center attribute of the DSFrame object. |
protected void |
moveCenter(Point c,
int cause)
move the center point somewhere on the table |
void |
moveElementCenterTo(Point2D.Double touchPoint)
can be used to make the element change its position to be centered under the given point |
void |
paint(Graphics g)
Call the other paint()at high quality. |
void |
paint(Graphics2D g,
int qual)
Paint the frame ... |
void |
paintBackInternal(Graphics2D g)
|
void |
paintFoldCorner(Graphics2D Graphics_Arg)
Paint the corners to resize a frame (when selected) |
void |
paintInternal(Graphics2D g)
|
protected void |
paintMenu2(Graphics2D g)
|
void |
paintResizeCornerBR(Graphics2D Graphics_Arg)
paint the bottom right corner for resize |
void |
paintResizeCornerTL(Graphics2D Graphics_Arg)
Paint the corners to resize a frame (when selected) |
void |
paintRotateCorner(Graphics2D Graphics_Arg)
Paint the corner to rotate a frame (when selected) |
protected void |
paintShadow(Graphics2D g)
delegate shadow painting to the ShadowManager |
protected void |
paintShadowOld(Graphics2D g)
paint shadow the old way |
void |
paintSlaves(Graphics2D g)
Call the other paint() of all the slaves |
void |
paintSoftBorder(Graphics2D Graphics_Arg)
paint an antialised border on top of the regular border to soften the edge when rotated // @TODO respect the clip or remove |
protected MouseEvent |
redispatchEvent(MouseEvent event)
Convert a MouseEvent and dispatch it synchronized because of the setContentPane |
void |
refreshShadow()
refresh the cast shadow |
void |
removeAllSlaveElement()
|
void |
removeDSElementListener(DSElementListener listener)
Unregister a elementlistener who don't want anymore to know when an element is resized, rotated, moved , etc. |
void |
removeDSElementPreListener(DSElementPreListener listener)
|
void |
removeSlaveElement(DSElement dsElement)
remove a slave WIHOUT demoting to th |
void |
repaint()
|
protected void |
resetSlaveFrame(DSElement dsElement)
|
void |
reshape(int x_Arg,
int y_Arg,
int width_Arg,
int height_Arg)
Deprecated. We had to overwrite this deprecated function because it is where the code is done in JComponent |
void |
setAbsoluteScale(double absolutescale)
change the absolute scale factor. |
void |
setActive(boolean active_Arg)
change if the component is active or not (with shadow = is selected) |
void |
setAllCorners(boolean corner_Arg)
say if the component is resizable & rotable zoomable and foldable |
void |
setAlpha(double alpha)
change the angle from the right horitontal direction. |
void |
setAlphaAndD(double alpha,
double d,
int cause)
|
void |
setAnnotable(boolean isInkButton)
|
void |
setAnnotatable(boolean annotatable_Arg)
Sets the annotatable attribute of the DSFrame object |
void |
setAnnotationOptions(int annotationOptions)
|
void |
setBackClippingShape(Shape backClippingShape)
set the clipping Shape used to restrict the painting |
void |
setBackGlassPane(Container pane)
change the backGlassPane |
void |
setBackOpacity(float backOpacity)
|
void |
setBackPane(Container pane)
change the backpane |
void |
setBehavior(int beh)
Sets the behavior attribute of the DSWindow object : CENTERED, SHIFTED, ROTATED, BETATED |
void |
setBeta(double alpha)
change the angle around its own center, not the center of the polar coordinate system |
void |
setBeta(double alpha,
int cause)
|
void |
setBetaAbs(boolean betaAbs)
change how to use beta. |
void |
setCenter(Point c)
Set the center attribute of the DSFrame object. |
void |
setCenterTo(double x_Arg,
double y_Arg)
set the variable center of gravity of this element |
void |
setCenterTo(Point2D.Double p)
|
void |
setCornerFold(boolean corner_Arg)
change if the component has a corner for folding |
void |
setCornerRotation(boolean corner_Arg)
|
void |
setCornersResizeBR(boolean corner_Arg)
|
void |
setCornersResizeTL(boolean corner_Arg)
|
void |
setD(double d)
change the distance to the center of the circular layout |
void |
setFingerRotatable(boolean fingerRotatable_Arg)
change if the component can be rotated by rotating the finger (vision feature) |
void |
setFingerRotationMode(DSFrame.FingerRotationMode fingerRotationMode_Arg)
change the finger rotation mode (vision feature) |
void |
setFingerRotationSpeed(DSFrame.FingerRotationSpeed fingerRotationSpeed)
change the finger rotation speed |
void |
setFoldable(boolean foldable_Arg)
Sets the foldable attribute of the DSFrame object |
void |
setFoldReverse(boolean fr)
|
void |
setFrontClippingShape(Shape frontClippingShape)
set the clipping Shape used to restrict the painting |
void |
setFrontier(int frontier)
|
void |
setFrontOpacity(float frontOpacity)
|
void |
setGlobalClippingShape(Shape globalClippingShape)
set the clipping Shape used to restrict the painting |
void |
setIcon(boolean Icon_Arg)
is not currently implemented |
void |
setIDOwner(int id)
set the user id of the owner of this object (-1 is no owner) |
void |
setInertiaType(int type)
|
void |
setJMenuBar(JMenuBar m)
|
void |
setJMenuBarPosition(int p)
|
void |
setMaximumScale(double maximumScale)
|
void |
setMinimumScale(double minimumScale)
|
void |
setMode(int mode_arg)
Sets the interactive mode of the DSFrame object : WAITING, DRAGGING, ZOOMING_TL, ZOOMING_BR,... |
void |
setPreferredSize(Dimension dim_Arg)
|
void |
setRotatable(boolean rotatable_Arg)
change if the component can be rotated around its own center |
void |
setRotationCorner(int fixedPoint)
|
void |
setScale(double scale)
change the scale factor to resize the element at low level (pixel by pixel). |
void |
setShadow(int shadow)
|
void |
setShadowAdditionnalAngle(double shadowAdditionnalAngle)
|
void |
setShadowClip(Shape shadowClip)
|
void |
setShadowDistance(int dist)
|
void |
setShadowHighQuality(boolean shadowHighQuality)
|
void |
setShadowSource(double ssAlpha,
double ssD)
|
void |
setSize(Dimension Dimension_Arg)
change the size of the DSframe |
void |
setSize(int width,
int height)
Elements are displayed around their center (not around their top left corner) Width and Height are the amount of space used by the repaint. |
void |
setSlavePosition(int slavePosition)
TOP (slaves will appear on top of their master), BOTTOM (opposite) or IN_BETWEEN (will appear between the recto and the verso) |
void |
setSlaveTransform(AffineTransform slaveTransform)
|
void |
setSnapAngle(double snapAngle)
|
void |
setTitleBarPosition(int p)
tells whether a title bar must be visible |
void |
setTransparency(int transparency)
|
void |
setViewPort(JViewport jViewport_arg)
change what is known as the "scrollable part of the frame". |
void |
setZoomable(boolean Zoomable)
|
void |
startAnnotating(MouseEvent evt_arg)
start an annotation |
String |
toString()
|
protected Point2D.Double |
transformBackToLocal(Point2D.Double Point_Arg)
take a point in the local coordinate system and transform it in a local coordinate system ... |
Point2D.Double |
transformPoint(Point2D.Double p)
take a point in the local coordinate system and transform it in the global coordinate system |
Point2D.Float |
transformPoint(Point2D.Float p)
take a point in the local coordinate system and transform it in the global coordinate system |
Point2D.Double |
transformVector(Point2D.Double v)
take a vector in the local coordinate system and transform it in the global coordinate system |
void |
unfold()
unfold totally ths frame |
void |
validate()
Overload this annoying function which is not relevant anymore |
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 |
---|
public static int serialVersionUID
protected Container backPane
protected Container backGlassPane
public static final int CORNER_SIZE
protected Point2D.Double grabCornerPoint
public static final int WAITING
public static final int DRAGGING
public static final int ZOOMING_BR
public static final int ZOOMING_TL
public static final int RESIZING_TL
public static final int RESIZING_BR
public static final int ROTATING
public static final int FOLDING
public static final int ANNOTATING
public static final int ANNOTATING_SINGLE_TIME
public static final int ERASING
public static final int FOLLOWING_TWO_FINGERS
protected int mode
public static final int ERASER
public static final int GRAY
public static final int DARKER
public static final int SMALL
protected int annotationOptions
protected transient DSFrame.DSInternalFrameTitlePane biftpTop
protected transient DSFrame.DSInternalFrameTitlePane biftpBottom
public static final int CENTERED
public static final int SHIFTED
public static final int ROTATED
public static final int BETATED
protected int behavior
public transient DSTabletopPane dsTabletopPane
protected transient Component lastComponent
protected transient Component clickedComponent
protected transient DSElement clickedSlave
protected transient Point2D.Double globalPoint
protected double d
protected double alpha
protected boolean annotatable
protected int idOwner
protected double beta
protected double scale
protected double minimumScale
protected double maximumScale
protected double absoluteScale
protected double initDiagonal
protected boolean corners_resize_TL
protected boolean corners_resize_BR
protected boolean corner_rotation
protected boolean corner_fold
protected boolean rotatable
protected boolean zoomable
protected boolean fingerRotatable
public DSTouchEvent lastRotationEvent
protected DSFrame.FingerRotationMode fingerRotationMode
protected DSFrame.FingerRotationSpeed fingerRotationSpeed
protected double diffAngle
protected float absoluteShiftAngle
protected JViewport jViewport1
protected boolean active
protected double scaleCorrection
protected Point dTopLeftCorner
protected Point center
protected DSJComboBox jComboBox1
public static final int NONE
public static final int TOP
public static final int BOTTOM
public static final int BOTH
public static final int IN_BETWEEN
protected int titlebar
public static final int GLASS
public static final int USER_COLOR
protected int transparency
public static final int BLACK
public static final int CAST
public static final int ALWAYS
protected static final int COLORBITS
protected int shadow
protected int frontier
protected DSShadowManager shadowManager
protected boolean shadowNeedRefresh
protected DSFoldingManager foldingManager
protected DSFrame thisDSFrame
protected ArrayList<DSElement> slaveElementList
protected int slavePosition
protected int betaAbsFlag
protected transient Component lastComponentUsed
protected DSFrame.DSMenuBarProxy menubar
protected DSMenuBar oldmenubar
public static final int CENTER
public static final int OPPOSITE
public static final int MIDDLE
public static final int INTELIGENT
protected int fixedPointForRotation
protected Point savedCenter
protected Point2D.Double savedRotationCornerPosition
protected Point previousMousePosition
protected Point previousPreviousMousePosition
protected double curvature
protected double savedBeta
protected static ImageIcon inkIcon
protected static ImageIcon inkIconPressed
protected static ImageIcon eraserIconPressed
protected static ImageIcon logoIcon
protected int inertiaType
protected Point2D.Double invertiaCenter
protected Point2D.Double[][] invertiaMesh
Constructor Detail |
---|
public DSFrame(DSTabletopPane pane)
pane
- the container in which the frame existspublic DSFrame(String title_Arg, DSTabletopPane dsTabletopPane_Arg)
title_Arg
- the title of the framedsTabletopPane_Arg
- the container in which the frame existsMethod Detail |
---|
public AffineTransform getSlaveTransform()
public void setSlaveTransform(AffineTransform slaveTransform)
slaveTransform
- the slaveTransform to setpublic void setBehavior(int beh)
public int getBehavior()
public int getMode()
public void setMode(int mode_arg)
mode_arg
- The new modepublic DSTabletopPane getTabletopPane()
public double getD()
DSElement
getD
in interface DSElement
public void setD(double d)
setD
in interface DSElement
d
- The new d valuepublic double getAlpha()
DSElement
getAlpha
in interface DSElement
public void setAlpha(double alpha)
setAlpha
in interface DSElement
alpha
- The new alpha valuepublic void setAlphaAndD(double alpha, double d, int cause)
public void setSize(Dimension Dimension_Arg)
setSize
in class Component
Dimension_Arg
- the dimension of the new sizepublic void setSize(int width, int height)
DSElement
setSize
in interface DSElement
setSize
in class Component
width
- The new size valueheight
- The new size valuepublic boolean isAnnotatable()
public void setAnnotatable(boolean annotatable_Arg)
public boolean isFolded()
public boolean isFoldable()
public void setFoldable(boolean foldable_Arg)
public Container getBackPane()
public void setBackPane(Container pane)
public Container getBackGlassPane()
public void setBackGlassPane(Container pane)
public int getBackPaneHeight()
public int getBackPaneWidth()
public void setIDOwner(int id)
setIDOwner
in interface DSElement
id
- The new iDOwner valuepublic int getIDOwner()
getIDOwner
in interface DSElement
public double getBeta()
DSElement
getBeta
in interface DSElement
public void setBeta(double alpha)
setBeta
in interface DSElement
alpha
- The new beta valuepublic void setBeta(double alpha, int cause) throws IllegalArgumentException
IllegalArgumentException
public double getScale()
DSElement
getScale
in interface DSElement
public void setScale(double scale)
setScale
in interface DSElement
scale
- The new scale valuepublic void setAbsoluteScale(double absolutescale)
public double getAbsoluteScale()
getAbsoluteScale
in interface DSElement
public void setAllCorners(boolean corner_Arg)
corner_Arg
- The new corners value@Deprecated public boolean isCorners()
public void setCornersResizeTL(boolean corner_Arg)
public boolean isCornersResizeTL()
public void setCornersResizeBR(boolean corner_Arg)
public boolean isCornersResizeBR()
public void setCornerRotation(boolean corner_Arg)
public boolean isCornerRotation()
public void setCornerFold(boolean corner_Arg)
public boolean isCornerFold()
public void setRotatable(boolean rotatable_Arg)
public boolean isRotatable()
public void setFingerRotatable(boolean fingerRotatable_Arg)
public void setFingerRotationMode(DSFrame.FingerRotationMode fingerRotationMode_Arg)
public DSFrame.FingerRotationMode getFingerRotationMode()
public void setFingerRotationSpeed(DSFrame.FingerRotationSpeed fingerRotationSpeed)
public DSFrame.FingerRotationSpeed getFingerRotationSpeed()
public boolean isFingerRotatable()
public void setRotationCorner(int fixedPoint)
public JViewport getViewPort()
public void setViewPort(JViewport jViewport_arg)
jViewport_arg
- The new viewPort valuepublic void moveElementCenterTo(Point2D.Double touchPoint)
moveElementCenterTo
in interface DSElement
touchPoint
- (the cartesian point under which to center the element)public void setCenterTo(double x_Arg, double y_Arg)
x_Arg
- The new coordinate of the center in this frame coordinate spacey_Arg
- The new coordinate of the center in this frame coordinate spacepublic void setCenterTo(Point2D.Double p)
public boolean isActive()
DSElement
isActive
in interface DSElement
public void setActive(boolean active_Arg)
setActive
in interface DSElement
active_Arg
- The new active valuepublic Point getCenter()
public void setCenter(Point c)
public void moveCenter(Point c)
protected void moveCenter(Point c, int cause)
public void setIcon(boolean Icon_Arg) throws PropertyVetoException
setIcon
in class JInternalFrame
Icon_Arg
- The new icon value
PropertyVetoException
- Description of the Exceptionpublic boolean isShowing()
isShowing
in class Component
public boolean grabElement(int dX_Arg, int dY_Arg)
grabElement
in interface DSElement
dX_Arg
- Description of the ParameterdY_Arg
- Description of the Parameter
public void addDSElementListener(DSElementListener listener)
addDSElementListener
in interface DSElement
listener
- the new listenerpublic void removeDSElementListener(DSElementListener listener)
removeDSElementListener
in interface DSElement
listener
- the listenerpublic DSElementListener[] getDSElementListener()
public void addDSElementPreListener(DSElementPreListener listener)
public void removeDSElementPreListener(DSElementPreListener listener)
public DSElementPreListener[] getDSElementPreListener()
public void fireDSElementMovedEvent(double distance_Arg, double tangle, int cause)
distance_Arg
- Description of the Parametertangle
- Description of the Parameterpublic void fireDSElementResizedEvent(int w, int h, int cause)
w
- widthh
- heightcause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public void fireDSElementCenterChangedEvent(int x, int y, int cause)
x
- , y the new center of the framecause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public void fireDSElementZoomedEvent(double s, int cause)
s
- s new scale of the framecause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public void fireDSelementContentRepainted(int cause)
cause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public void fireDSElementRotatedEvent(double b, int cause)
b
- Description of the Parametercause
- constant describing the cause of the event (USER, NO_MORE_ALLOWED, SOFTWARE, etc.)public void fireDSElementFoldedEvent(double fangle, double fproportion, int cause)
fangle
- direction of the foldingfproportion
- fold proportion 0=No fold, 1=totally foldedcause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public boolean fireDSElementGrabbingEvent(int type)
type
- constant describing what king of grabbing (MOVE, ROTATE RESIZE, FOLD or ZOOM)
public void fireDSElementDroppedEvent(int type)
type
- constant describing what king of grabbing (MOVE, ROTATE RESIZE, FOLD or ZOOM)public void fireDSElementDemotedEvent()
public boolean fireDSElementPreMovedEvent(double distance_Arg, double tangle, int cause)
distance_Arg
- distance to the centertangle
- angle from horizontalcause
- constant describing the cause of the event (USER, NO_MORE_ALLOWED, SOFTWARE, etc.)
public boolean fireDSElementPreResizedEvent(int w, int h, int cause)
w
- widthh
- heightcause
- constant describing the cause of the event (USER, SOFTWARE, etc.)
public boolean fireDSElementPreCenterChangedEvent(int x, int y, int cause)
x
- , y the new centercause
- constant describing the cause of the event (USER, SOFTWARE, etc.)
public boolean fireDSElementPreZoomedEvent(double scale, int cause)
scale
- Description of the Parametercause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public boolean fireDSElementPreRotatedEvent(double b, int cause)
b
- Description of the Parametercause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public boolean fireDSElementPreFoldedEvent(double fangle, double fproportion, int cause)
fangle
- folding directionfproportion
- folding proportioncause
- constant describing the cause of the event (USER, SOFTWARE, etc.)public DSTabletopPane getDSTabletopPane()
public void setPreferredSize(Dimension dim_Arg)
setPreferredSize
in class JComponent
public void refreshShadow()
public void askRefreshShadow()
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public void setTitleBarPosition(int p)
p
- the new position of the titlebar = {NONE, TOP, BOTTOM, BOTH}public int getTitleBarPosition()
public Container getParent()
getParent
in class Component
public Point getLocationOnScreen()
getLocationOnScreen
in class Component
public Graphics getGraphics()
getGraphics
in class JComponent
@Deprecated public Rectangle getBounds()
getBounds
in class Component
@Deprecated public Rectangle getBounds(Rectangle rv)
getBounds
in class JComponent
public Image createImage(int Width_Arg, int Height_Arg)
createImage
in class Component
Width_Arg
- Description of the ParameterHeight_Arg
- Description of the Parameter
public void validate()
validate
in class Container
public void unfold()
public void foldTo(Point2D.Double pt)
@Deprecated public void reshape(int x_Arg, int y_Arg, int width_Arg, int height_Arg)
reshape
in class JInternalFrame
x_Arg
- The new size valuey_Arg
- The new size valuewidth_Arg
- The new size valueheight_Arg
- The new size valuepublic void paintInternal(Graphics2D g)
public void paintBackInternal(Graphics2D g)
public void paint(Graphics g)
paint
in interface DSElement
paint
in class JComponent
g
- Graphics to draw withpublic void paint(Graphics2D g, int qual)
paint
in interface DSElement
g
- a graphic context on the general componentqual
- Quality of the painting*public void paintSlaves(Graphics2D g)
g
- Graphics to draw withprotected void paintShadow(Graphics2D g)
g
- Graphics to draw withprotected void paintShadowOld(Graphics2D g)
g
- Graphics to draw withpublic void paintFoldCorner(Graphics2D Graphics_Arg)
Graphics_Arg
- the painting objectpublic void paintResizeCornerTL(Graphics2D Graphics_Arg)
Graphics_Arg
- the painting objectpublic void paintResizeCornerBR(Graphics2D Graphics_Arg)
public void paintRotateCorner(Graphics2D Graphics_Arg)
Graphics_Arg
- the painting objectpublic double getSnapAngle()
public void setSnapAngle(double snapAngle)
snapAngle
- the snapAngle to setpublic void disableSnaping()
public AffineTransform getTransform()
DSElement
getTransform
in interface DSElement
public AffineTransform getBackTransform()
public Point2D.Double transformPoint(Point2D.Double p)
p
- the point to transform
public Point2D.Float transformPoint(Point2D.Float p)
p
- the point to transform
public Point2D.Double transformVector(Point2D.Double v)
v
- the vector to transform
public Point2D.Double inversePoint(Point2D.Double p)
p
- the point to transform
public Point2D.Float inversePoint(Point2D.Float p)
p
- the point to transform
public Point inverseVector(Point v)
v
- the vector to transform
protected Point2D.Double inversePointBack(Point2D.Double p)
p
- the point to transform
protected Point2D.Double inverseVectorBack(Point2D.Double Point_Arg)
protected Point2D.Double transformBackToLocal(Point2D.Double Point_Arg)
public void repaint()
repaint
in class Component
protected MouseEvent redispatchEvent(MouseEvent event)
event
- an initial MouseEvent dispatch in sub-components
public boolean isMouseTarget(MouseEvent event)
isMouseTarget
in interface DSElement
event
- Description of the Parameter
public boolean contains(int x, int y)
contains
in class JComponent
public boolean doesContain(double x, double y)
doesContain
in interface DSElement
x
- cartesian x coordinatey
- cartesian y coordinate
public boolean doesContainFront(double x, double y)
x
- cartesian x coordinatey
- cartesian y coordinate
public boolean doesContainBack(double x, double y)
x
- cartesian x coordinatey
- cartesian y coordinate
public boolean containsFront(double x, double y)
public boolean containsBack(double x, double y)
public void startAnnotating(MouseEvent evt_arg)
protected void mousePressedInside(MouseEvent event, Point2D.Double mousePosition_arg)
protected void mousePressedInsideBack(MouseEvent event, Point2D.Double localBackPoint)
protected void mousePressedTestBack(MouseEvent event)
protected void mousePressedTestFront(MouseEvent event)
public void mousePressed(MouseEvent event)
mousePressed
in interface MouseListener
mousePressed
in interface DSElement
event
- The mouseEvent with more details on the eventpublic void mouseReleased(MouseEvent event)
mouseReleased
in interface MouseListener
mouseReleased
in interface DSElement
event
- Description of the Parameterpublic void mouseMoved(MouseEvent event)
mouseMoved
in interface MouseMotionListener
mouseMoved
in interface DSElement
event
- Description of the Parameterpublic void mouseDragged(MouseEvent event)
mouseDragged
in interface MouseMotionListener
mouseDragged
in interface DSElement
event
- Description of the Parameterpublic void mouseClicked(MouseEvent event)
mouseClicked
in interface MouseListener
mouseClicked
in interface DSElement
event
- Description of the Parameterpublic void mouseEntered(MouseEvent event)
mouseEntered
in interface MouseListener
event
- Description of the Parameterpublic void mouseExited(MouseEvent event)
mouseExited
in interface MouseListener
event
- Description of the Parameterprotected void paintMenu2(Graphics2D g)
public void setJMenuBar(JMenuBar m)
setJMenuBar
in class JInternalFrame
public JMenuBar getJMenuBar()
getJMenuBar
in class JInternalFrame
public void setJMenuBarPosition(int p)
public int getJMenuBarPosition()
public void paintSoftBorder(Graphics2D Graphics_Arg)
Graphics_Arg
- Description of the Parameterpublic String toString()
toString
in class Component
public void addSlaveElement(DSElement dsElement)
public void addSlaveElement(int pos, DSElement dsElement)
public void removeSlaveElement(DSElement dsElement)
public void removeAllSlaveElement()
public boolean acceptSlave(DSElement dsElement)
dsElement
- the possible slave to accept or not
public boolean acceptSlaveryRelease()
acceptSlaveryRelease
in interface DSElement
public boolean acceptSlaveRelease(DSElement dsElement)
dsElement
- the slave who want to get released
public boolean acceptSlavery(DSElement dsElement)
acceptSlavery
in interface DSElement
dsElement
- the potential master to be slave of
protected void resetSlaveFrame(DSElement dsElement)
public int getTransparency()
public void setTransparency(int transparency)
public boolean isZoomable()
public void setZoomable(boolean Zoomable)
public void addHeaderButton(AbstractButton b)
public void addFooterButton(AbstractButton b)
public void setAnnotable(boolean isInkButton)
public int getShadow()
public void setShadow(int shadow)
public int getShadowDistance()
public void setShadowDistance(int dist)
public int getFrontier()
public void setFrontier(int frontier)
public BufferedImage getShadowImage()
public Point getShadowPosition()
public int getShadowSize()
public void computeShadowPosition()
public Shape getShadowClip()
public void setShadowClip(Shape shadowClip)
public double getShadowAdditionnalAngle()
public void setShadowAdditionnalAngle(double shadowAdditionnalAngle)
public boolean isShadowSource()
public void setShadowSource(double ssAlpha, double ssD)
public boolean isShadowHighQuality()
public void setShadowHighQuality(boolean shadowHighQuality)
public boolean isMyDragObject()
public boolean isADragObject()
public float getBackOpacity()
public void setBackOpacity(float backOpacity)
public float getFrontOpacity()
public void setFrontOpacity(float frontOpacity)
public boolean isFoldReverse()
public void setFoldReverse(boolean fr)
fr
- Is the backpane model a recto verso one (true) or a transparent slide (false) one ?public void setFrontClippingShape(Shape frontClippingShape)
public Shape getFrontClippingShape()
public void setBackClippingShape(Shape backClippingShape)
public Shape getBackClippingShape()
public void setGlobalClippingShape(Shape globalClippingShape)
public Shape getGlobalClippingShape()
public boolean isClip()
public Shape getFoldShapeFront()
public Shape getFoldShapeBack()
public double getFoldProportion()
public BufferedImage getFrontImage()
public BufferedImage getBackImage()
public Point2D.Double getFoldPoint()
public int getFoldType()
public Point2D.Double getFoldPoint1()
public Point2D.Double getFoldPoint2()
public ArrayList<DSElement> getSlaveElementList()
public double getMinimumScale()
public void setMinimumScale(double minimumScale)
public double getMaximumScale()
public void setMaximumScale(double maximumScale)
public void setAnnotationOptions(int annotationOptions)
public void setBetaAbs(boolean betaAbs)
DSElement
setBetaAbs
in interface DSElement
public boolean isBetaAbs()
DSElement
isBetaAbs
in interface DSElement
public int getSlavePosition()
public void setSlavePosition(int slavePosition)
public int getInertiaType()
public void setInertiaType(int type)
public Point2D.Double inertiaCenter()
public Point2D.Double[][] inertiaMesh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |