Package net.sf.jaxodraw.object
Interface JaxoObjectEditPanel
- All Known Implementing Classes:
JaxoOptionsPanel
public interface JaxoObjectEditPanel
A panel to edit properties of JaxoObjects.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Defines an EditPanel for a simple color, of eg a vertex, a text, etc.static final int
Defines a ColorEditPanel for a fill color.static final int
Defines a ColorEditPanel for a the line color of a fill object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add2PointsPanel
(Point[] points, int gridx, int gridy) Adds a 2PointEdit panel at the given position with the given width.void
add3PointsPanel
(Point[] points, int gridx, int gridy) Adds a 3points panel at the given position.void
add3PointsPanel
(Point[] points, int gridx, int gridy, int gridwidth) Adds a 3points panel at the given position with the given width.void
add4PointsPanel
(Point[] points, int gridx, int gridy) Adds a 4points panel at the given position.void
add4PointsPanel
(Point[] points, int gridx, int gridy, int gridwidth) Adds a 4points panel at the given position with the given width.void
addArrowOptionsEditPanel
(JaxoArrow arrow, int gridx, int gridy) Adds an edit panel for an arrow at the given position.void
addArrowPanel
(boolean arrow, boolean flip, float oldPosition, int gridx, int gridy) Adds an arrow panel for an object at the given position.void
addCenterSizePanel
(int x, int y, int w, int h, int gridx, int gridy) Adds a position/size panel at the given position.void
ChangeEvents will be fired everytime the object that is being edited changes.void
addColorPanel
(Color color, int type, int gridx, int gridy) Adds a color panel at the given position.void
addDashPanel
(float dash, int gridx, int gridy) Adds a dash panel for an arc object at the given position.void
addDoubleLinePanel
(boolean dLine, float dlSep, int gridx, int gridy) Adds a double line panel for an object at the given position.void
addFillLineColorPanels
(Color color, Color fillColor, boolean isFilled, int fillX, int fillY, int lineX, int lineY) Adds a fill and a line color panel at the given positions.void
addLatexAlignPanel
(int allign, int gridx, int gridy) Adds a latex align edit panel at the given position.void
addLatexFontSizePanel
(int size, int gridx, int gridy) Adds a latex font size edit panel at the given position.void
addLineColorPanel
(Color color, int gridx, int gridy) Adds a line color panel at the given position.void
addPositionPanel
(int x, int y, int gridx, int gridy) Adds a position edit panel at the given position with the given width.void
addPSFontPanel
(Font font, int gridx, int gridy, int gridwidth) Adds a postscript text font edit panel at the given position.void
addReScalePanel
(int gridx, int gridy) Adds a scale panel for an object at the given position.void
addRotationPanel
(int angle, int gridx, int gridy) Adds a rotation panel for a vertex at the given position.void
addStretchingPanel
(boolean noFreqStretching, int gridx, int gridy) Adds a stretching panel for a photon bezier at the given position.void
addStrokePanel
(float width, int gridx, int gridy) Adds a stroke panel for an arc object at the given position.void
addSymmPanel
(boolean symm, int gridx, int gridy) Adds a symmetry panel for a photon line at the given position.void
addTextPanel
(String text, int gridx, int gridy) Adds a text edit panel at the given position.void
addWigglePanel
(int amp, int gridx, int gridy) Adds a wiggle panel for a group at the given position.void
addWigglePanel
(int amp, int wiggles, int gridx, int gridy) Adds a wiggle panel for an object at the given position.void
addXYRPanel
(int x, int y, int r, int gridx, int gridy) Adds a XYR panel at the given position.boolean
Determines wether the object has been modified.void
setTitleAndIcon
(String newTitle, String newIcon) Set title (message key) and icon (filename) that are displayed in the dialog.void
Display the EditPanel for the current object.
-
Field Details
-
TYPE_COLOR
static final int TYPE_COLORDefines an EditPanel for a simple color, of eg a vertex, a text, etc.- See Also:
-
TYPE_LINE_COLOR
static final int TYPE_LINE_COLORDefines a ColorEditPanel for a the line color of a fill object.- See Also:
-
TYPE_FILL_COLOR
static final int TYPE_FILL_COLORDefines a ColorEditPanel for a fill color.- See Also:
-
-
Method Details
-
addChangeListener
ChangeEvents will be fired everytime the object that is being edited changes.- Parameters:
l
- The listener to add.
-
show
Display the EditPanel for the current object.- Parameters:
parent
- The parent component for the edit panel windowl
- The location for for the edit panel window
-
hasChanged
boolean hasChanged()Determines wether the object has been modified.- Returns:
- True if the object has been modified.
-
setTitleAndIcon
Set title (message key) and icon (filename) that are displayed in the dialog.- Parameters:
newTitle
- the title.newIcon
- the icon.
-
add3PointsPanel
Adds a 3points panel at the given position.- Parameters:
points
- The points of the arc object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
add3PointsPanel
Adds a 3points panel at the given position with the given width.- Parameters:
points
- The points of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.gridwidth
- The width of the subpanel.
-
add4PointsPanel
Adds a 4points panel at the given position.- Parameters:
points
- The points of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
add4PointsPanel
Adds a 4points panel at the given position with the given width.- Parameters:
points
- The points of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.gridwidth
- The width of the subpanel.
-
addPositionPanel
void addPositionPanel(int x, int y, int gridx, int gridy) Adds a position edit panel at the given position with the given width.- Parameters:
x
- The x position of the object to be edited by this panel.y
- The y position of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
add2PointsPanel
Adds a 2PointEdit panel at the given position with the given width.- Parameters:
points
- The points of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addXYRPanel
void addXYRPanel(int x, int y, int r, int gridx, int gridy) Adds a XYR panel at the given position.- Parameters:
x
- The x position of the object to be edited by this panel.y
- The r position of the object to be edited by this panel.r
- The radius of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addCenterSizePanel
void addCenterSizePanel(int x, int y, int w, int h, int gridx, int gridy) Adds a position/size panel at the given position.- Parameters:
x
- The x position of the object to be edited by this panel.y
- The y position of the object to be edited by this panel.w
- The width of the object to be edited by this panel.h
- The height of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addDashPanel
void addDashPanel(float dash, int gridx, int gridy) Adds a dash panel for an arc object at the given position.- Parameters:
dash
- The dash sizie of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addStrokePanel
void addStrokePanel(float width, int gridx, int gridy) Adds a stroke panel for an arc object at the given position.- Parameters:
width
- The the stroke width of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addReScalePanel
void addReScalePanel(int gridx, int gridy) Adds a scale panel for an object at the given position.- Parameters:
gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addWigglePanel
void addWigglePanel(int amp, int wiggles, int gridx, int gridy) Adds a wiggle panel for an object at the given position.- Parameters:
amp
- The oamplitude of the bject to be edited by this panel.wiggles
- The wiggles of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addWigglePanel
void addWigglePanel(int amp, int gridx, int gridy) Adds a wiggle panel for a group at the given position.- Parameters:
amp
- The amplitude of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addSymmPanel
void addSymmPanel(boolean symm, int gridx, int gridy) Adds a symmetry panel for a photon line at the given position.- Parameters:
symm
- The symmetry of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addStretchingPanel
void addStretchingPanel(boolean noFreqStretching, int gridx, int gridy) Adds a stretching panel for a photon bezier at the given position.- Parameters:
noFreqStretching
- The stretching parameter of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addRotationPanel
void addRotationPanel(int angle, int gridx, int gridy) Adds a rotation panel for a vertex at the given position.- Parameters:
angle
- The rotation angle of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addArrowPanel
void addArrowPanel(boolean arrow, boolean flip, float oldPosition, int gridx, int gridy) Adds an arrow panel for an object at the given position.- Parameters:
arrow
- The arrow of the object to be edited by this panel.flip
- The flip of the arrow.oldPosition
- The old position of the Arrowgridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addArrowOptionsEditPanel
Adds an edit panel for an arrow at the given position. If the arrow does not provide an edit panel, ie ifJaxoArrow.getEditPanel()
returns null, then nothing happens.- Parameters:
arrow
- The arrow to be edited.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addDoubleLinePanel
void addDoubleLinePanel(boolean dLine, float dlSep, int gridx, int gridy) Adds a double line panel for an object at the given position.- Parameters:
dLine
- The doubleLine of the object to be edited by this panel.dlSep
- The double line separation of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addLineColorPanel
Adds a line color panel at the given position.- Parameters:
color
- The color of the object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addFillLineColorPanels
void addFillLineColorPanels(Color color, Color fillColor, boolean isFilled, int fillX, int fillY, int lineX, int lineY) Adds a fill and a line color panel at the given positions. The line panel will be disabled (dynamically) based on the fill color/grayscale.- Parameters:
color
- The color of the object to be edited by this panel.fillColor
- The fill color of the object.isFilled
- Whether the object is filled.fillX
- The x position of the fill subpanel.fillY
- The y position of the fill subpanel.lineX
- The x position of the line subpanel.lineY
- The y position of the line subpanel.
-
addColorPanel
Adds a color panel at the given position.- Parameters:
color
- The color of the object to be edited by this panel.type
- The color mode. Should be one ofTYPE_COLOR
,TYPE_LINE_COLOR
orTYPE_FILL_COLOR
.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addTextPanel
Adds a text edit panel at the given position.- Parameters:
text
- The text object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addPSFontPanel
Adds a postscript text font edit panel at the given position.- Parameters:
font
- The font of the text to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.gridwidth
- The width of the subpanel.
-
addLatexAlignPanel
void addLatexAlignPanel(int allign, int gridx, int gridy) Adds a latex align edit panel at the given position.- Parameters:
allign
- The align property of the text to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-
addLatexFontSizePanel
void addLatexFontSizePanel(int size, int gridx, int gridy) Adds a latex font size edit panel at the given position.- Parameters:
size
- The text size of the text to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.
-