|
||||||||||
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.JPanel org.diamondspin.DSAnnotationPanel
public class DSAnnotationPanel
DSAnnotationPanel is a panel that goes in the glasspane of a DSFrame to display some stroke annotations on top of the
content of the DSFrame.
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 |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
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 ArrayList<DSStroke> |
DSStrokeList
The list of strokes |
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DSAnnotationPanel(DSFrame frame)
constructor |
Method Summary | |
---|---|
void |
addStroke(DSStroke stroke)
|
void |
addStrokeBack(DSStroke stroke)
|
void |
cleanAllStrokes()
remove all the annotations |
void |
eraseStrokesAround(Point position,
float radius)
find strokes point around a position ant set their size to 0 to hide them |
Polygon[] |
getAsPolygonList()
return all strokes as a list of polygons |
DSStroke |
getStroke(int i)
return a given stroke |
int |
getStrokeCount()
return the number of strokes |
ArrayList<DSStroke> |
getStrokeList()
|
boolean |
isOpaque()
so the other component know I'm transparent |
void |
paint(Graphics g)
Paint the annotations one by one |
void |
setDSFrame(DSFrame frame)
|
void |
setTabletopPane(DSTabletopPane dsTabletopPane)
Change the container for all the strokes |
void |
setVisible(boolean visible)
|
boolean |
strokeListIsEmpty()
remove all the annotations |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ArrayList<DSStroke> DSStrokeList
Constructor Detail |
---|
public DSAnnotationPanel(DSFrame frame)
Method Detail |
---|
public final void setDSFrame(DSFrame frame)
public boolean isOpaque()
isOpaque
in class JComponent
public ArrayList<DSStroke> getStrokeList()
public void addStroke(DSStroke stroke)
stroke
- The feature to be added to the Stroke attributepublic void addStrokeBack(DSStroke stroke)
stroke
- The feature to be added to the Stroke attributepublic void eraseStrokesAround(Point position, float radius)
position
- around what position we are going o erase pointsradius
- how far from the given position erasing will be effectivepublic void setTabletopPane(DSTabletopPane dsTabletopPane)
public void cleanAllStrokes()
public boolean strokeListIsEmpty()
public Polygon[] getAsPolygonList()
public DSStroke getStroke(int i)
public int getStrokeCount()
public void paint(Graphics g)
paint
in class JComponent
g
- the graphics engine corresponfing to the panelpublic void setVisible(boolean visible)
setVisible
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |