|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjpicedt.graphic.model.AbstractElement
jpicedt.graphic.model.BranchElement
jpicedt.graphic.model.PicGroup
public class PicGroup
A concrete implementation of BranchElement that is suited for building groups of elements. It
allows easy global resize/translate transformation by providing 8 control points that can be used by mouse
operation.
| Nested Class Summary | |
|---|---|
class |
PicGroup.GroupPointIterator
An iterator over PicPoint's that can serve as anchors for grid alignment. |
| Nested classes/interfaces inherited from class jpicedt.graphic.model.BranchElement |
|---|
BranchElement.CompoundMode |
| Field Summary | |
|---|---|
static int |
FIRST_PT
|
static int |
LAST_PT
|
static int |
LL
|
static int |
LM
|
static int |
LR
|
static int |
ML
|
static int |
MR
|
static int |
UL
|
static int |
UM
|
static int |
UR
|
| Fields inherited from class jpicedt.graphic.model.BranchElement |
|---|
changeLock, children, compoundMode, DEFAULT_LIFTPEN, isPathClosed, liftPen, ptsX, ptsY, shape |
| Fields inherited from class jpicedt.graphic.model.AbstractElement |
|---|
attributeSet, name, parent, view |
| Constructor Summary | |
|---|---|
PicGroup()
construct a PicGroup with no parent and a default PicAttributeSet |
|
PicGroup(BranchElement src)
Cloning constructor. |
|
PicGroup(Collection<? extends Element> c)
Simply call superclass's constructor. |
|
PicGroup(PicAttributeSet attributeSet)
construct a PicGroup with no parent and the given PicAttributeSet |
|
| Method Summary | |
|---|---|
PointIndexIterator |
anchorPointsIterator()
Create an Iterator over points that can serve as anchor points for grid alignment. |
PicGroup |
clone()
Return a deep copy of this PicGroup |
ArrayList<PEAction> |
createActions(ActionDispatcher actionDispatcher,
ActionLocalizer localizer,
HitInfo hi)
Creates an array of Action's related to this object. |
AbstractCustomizer |
createCustomizer()
Returns a customizer (Swing) component |
double |
getCtrlPtX(int numPoint)
|
double |
getCtrlPtY(int numPoint)
This default implementation returns ptsY[numPoint].This might be a valid implementation
as long as subclasses don't have other control points. |
String |
getDefaultName()
|
int |
getFirstPointIndex()
Return the index of the first user-controlled point that can be retrieved by getCtrlPt() |
CompositeHighlighter.HighlightingMode |
getHighlightingMode()
Return the current highlighting mode |
int |
getLastPointIndex()
Return the index of the last user-controlled point that can be retrieved by getCtrlPt() |
void |
setCtrlPt(int numPoint,
PicPoint ptNew,
EditPointConstraint constraint)
Set the point numbered by numPoint to the pt value, and scales inward object
accordingly. |
void |
setHighlightingMode(CompositeHighlighter.HighlightingMode mode)
set the current highlighting mode ; this influences the way the Highligther is painted,
but also the result returned by HitTest. |
void |
toggleHighlightingMode()
Toggle the current highlighting mode |
String |
toString()
Returns a String representing the group for debugging use only. |
void |
unGroup()
Fetch all Element's belonging to the given PicGroup and add them to its
parent, removing the given PicGroup from its parent afterward. |
| Methods inherited from class jpicedt.graphic.model.BranchElement |
|---|
add, add, addAll, addAll, bringBackward, bringForward, bringToBack, bringToFront, clear, closePath, contains, containsAll, containsClass, createFilteredCollection, createShape, equals, forwardChangedUpdate, get, getBoundingBox, getCompoundMode, getCtrlPt, getCtrlPtSubset, getLiftPen, hashCode, indexOf, isEmpty, isPathClosed, isToBack, isToFront, iterator, lastIndexOf, listIterator, listIterator, mirror, openPath, remove, remove, removeAll, removeView, replace, retainAll, rotate, scale, set, setAttribute, setAttributeSet, setCompoundMode, setCtrlPt, setLiftPen, setViewFromFactory, shear, shear, size, subList, syncArrowGeometry, toArray, toArray, toggleCompoundMode, togglePathClosure, translate, updateBoundingBox |
| Methods inherited from class jpicedt.graphic.model.AbstractElement |
|---|
fireChangedUpdate, getAttribute, getAttributeSet, getDrawing, getName, getParent, getView, pullOutOfGroup, replaceBy, scale, scale, scale, setName, setParent |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jpicedt.graphic.model.Element |
|---|
createShape, getAttribute, getAttributeSet, getBoundingBox, getCtrlPt, getCtrlPtSubset, getDrawing, getName, getParent, getView, mirror, removeView, replaceBy, rotate, scale, scale, scale, scale, setAttribute, setAttributeSet, setCtrlPt, setParent, setViewFromFactory, shear, shear, syncArrowGeometry, translate |
| Field Detail |
|---|
public static final int FIRST_PT
public static final int UL
public static final int UM
public static final int UR
public static final int ML
public static final int MR
public static final int LL
public static final int LM
public static final int LR
public static final int LAST_PT
| Constructor Detail |
|---|
public PicGroup()
public PicGroup(PicAttributeSet attributeSet)
public PicGroup(BranchElement src)
public PicGroup(Collection<? extends Element> c)
| Method Detail |
|---|
public PicGroup clone()
clone in interface Elementclone in class BranchElementpublic String getDefaultName()
getDefaultName in class BranchElementpublic void unGroup()
Element's belonging to the given PicGroup and add them to its
parent, removing the given PicGroup from its parent afterward.
public int getFirstPointIndex()
Element
getFirstPointIndex in interface ElementgetFirstPointIndex in class BranchElementpublic int getLastPointIndex()
Element
getLastPointIndex in interface ElementgetLastPointIndex in class BranchElementpublic double getCtrlPtX(int numPoint)
getCtrlPtX in class BranchElementnumPoint - the point index, should be greater or equal to the value returned by
getFirstPointIndex, and lower or equal to getLastPointIndex.
numPoint.public double getCtrlPtY(int numPoint)
BranchElementptsY[numPoint].This might be a valid implementation
as long as subclasses don't have other control points.
getCtrlPtY in class BranchElementnumPoint - the point index, should be greater or equal to the value returned by
getFirstPointIndex, and lower or equal to getLastPointIndex.
numPoint.
public void setCtrlPt(int numPoint,
PicPoint ptNew,
EditPointConstraint constraint)
numPoint to the pt value, and scales inward object
accordingly.
setCtrlPt in interface ElementsetCtrlPt in class BranchElementconstraint - not used here, may be safely set to nullpublic PointIndexIterator anchorPointsIterator()
AbstractElementDefaultPointIndexIterator which simply iterates through all user-controlled
points in ascending order.
anchorPointsIterator in interface ElementanchorPointsIterator in class AbstractElementPointIterator which simply iterates through
control points.public String toString()
toString in class BranchElementpublic void setHighlightingMode(CompositeHighlighter.HighlightingMode mode)
Highligther is painted,
but also the result returned by HitTest.
mode - or LOCAL_MODE or GLOBAL_MODEpublic CompositeHighlighter.HighlightingMode getHighlightingMode()
public void toggleHighlightingMode()
public ArrayList<PEAction> createActions(ActionDispatcher actionDispatcher,
ActionLocalizer localizer,
HitInfo hi)
Action's related to this object.
createActions in interface ActionFactorycreateActions in class AbstractElementactionDispatcher - répartiteur utilisé pour créer unePEActionlocalizer - utilisé pour localiser les paramètre des actionshi - une HitInfo contenant les informations relatives à l'évènement-souris qui a
déclencher le menu contextuel.public AbstractCustomizer createCustomizer()
CustomizerFactory
createCustomizer in interface CustomizerFactoryCustomizer for geometry editing.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||