public class JaxoOptionsPanel extends javax.swing.JPanel implements JaxoObjectEditPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
TYPE_COLOR, TYPE_FILL_COLOR, TYPE_LINE_COLOR
Constructor and Description |
---|
JaxoOptionsPanel(JaxoObject ob)
Constructor: initializes the panel.
|
Modifier and Type | Method and Description |
---|---|
void |
add2PointsPanel(java.awt.Point[] points,
int gridx,
int gridy)
Adds a 2PointEdit panel at the given position with the given width.
|
void |
add3PointsPanel(java.awt.Point[] points,
int gridx,
int gridy)
Adds a 3points panel at the given position.
|
void |
add3PointsPanel(java.awt.Point[] points,
int gridx,
int gridy,
int gridwidth)
Adds a 3points panel at the given position with the given width.
|
void |
add4PointsPanel(java.awt.Point[] points,
int gridx,
int gridy)
Adds a 4points panel at the given position.
|
void |
add4PointsPanel(java.awt.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 |
addChangeListener(javax.swing.event.ChangeListener l)
ChangeEvents will be fired everytime the object that is being
edited changes.
|
void |
addColorPanel(java.awt.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(java.awt.Color color,
java.awt.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(java.awt.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(java.awt.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(java.lang.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.
|
protected void |
fireStateChanged()
Notifies all listeners of a state change.
|
JaxoObject |
getObject()
The object that is being edited.
|
static java.util.List |
getRotationAngleDefaults()
List of numbers of default rotation angles to display to the user.
|
boolean |
hasChanged()
Determines wether the object has been modified.
|
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a change listener.
|
protected void |
resetObject()
Reset 'object' (and GUI) to initial value.
|
void |
setObject(JaxoObject value)
Set the object that is being edited.
|
void |
setTitleAndIcon(java.lang.String newTitle,
java.lang.String newIcon)
Set title (message key) and icon (filename) that are displayed in the dialog.
|
void |
show(java.awt.Component parent,
Location l)
Display the EditPanel for the current object.
|
protected void |
showDialog(java.awt.Component parent,
Location l)
Show a dialog for this panel.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, 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, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public JaxoOptionsPanel(JaxoObject ob)
ob
- The object to be edited by this panel.public static java.util.List getRotationAngleDefaults()
public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener
in interface JaxoObjectEditPanel
l
- The listener to add.public void removeChangeListener(javax.swing.event.ChangeListener l)
l
- The listener to remove.protected void fireStateChanged()
public final void setObject(JaxoObject value)
value
- the object that is being edited.public final JaxoObject getObject()
public final void add3PointsPanel(java.awt.Point[] points, int gridx, int gridy)
add3PointsPanel
in interface JaxoObjectEditPanel
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.public final void add3PointsPanel(java.awt.Point[] points, int gridx, int gridy, int gridwidth)
add3PointsPanel
in interface JaxoObjectEditPanel
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.public final void add4PointsPanel(java.awt.Point[] points, int gridx, int gridy)
add4PointsPanel
in interface JaxoObjectEditPanel
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.public final void add4PointsPanel(java.awt.Point[] points, int gridx, int gridy, int gridwidth)
add4PointsPanel
in interface JaxoObjectEditPanel
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.public final void addPositionPanel(int x, int y, int gridx, int gridy)
addPositionPanel
in interface JaxoObjectEditPanel
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.public final void add2PointsPanel(java.awt.Point[] points, int gridx, int gridy)
add2PointsPanel
in interface JaxoObjectEditPanel
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.public final void addXYRPanel(int x, int y, int r, int gridx, int gridy)
addXYRPanel
in interface JaxoObjectEditPanel
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.public final void addCenterSizePanel(int x, int y, int w, int h, int gridx, int gridy)
addCenterSizePanel
in interface JaxoObjectEditPanel
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.public final void addDashPanel(float dash, int gridx, int gridy)
addDashPanel
in interface JaxoObjectEditPanel
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.public final void addStrokePanel(float width, int gridx, int gridy)
addStrokePanel
in interface JaxoObjectEditPanel
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.public final void addReScalePanel(int gridx, int gridy)
addReScalePanel
in interface JaxoObjectEditPanel
gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.public final void addWigglePanel(int amp, int wiggles, int gridx, int gridy)
addWigglePanel
in interface JaxoObjectEditPanel
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.public final void addWigglePanel(int amp, int gridx, int gridy)
addWigglePanel
in interface JaxoObjectEditPanel
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.public final void addSymmPanel(boolean symm, int gridx, int gridy)
addSymmPanel
in interface JaxoObjectEditPanel
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.public final void addStretchingPanel(boolean noFreqStretching, int gridx, int gridy)
addStretchingPanel
in interface JaxoObjectEditPanel
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.public final void addRotationPanel(int angle, int gridx, int gridy)
addRotationPanel
in interface JaxoObjectEditPanel
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.public final void addArrowPanel(boolean arrow, boolean flip, float oldPosition, int gridx, int gridy)
addArrowPanel
in interface JaxoObjectEditPanel
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.public final void addArrowOptionsEditPanel(JaxoArrow arrow, int gridx, int gridy)
JaxoArrow.getEditPanel()
returns null,
then nothing happens.addArrowOptionsEditPanel
in interface JaxoObjectEditPanel
arrow
- The arrow to be edited.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.public final void addDoubleLinePanel(boolean dLine, float dlSep, int gridx, int gridy)
addDoubleLinePanel
in interface JaxoObjectEditPanel
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.public final void addLineColorPanel(java.awt.Color color, int gridx, int gridy)
addLineColorPanel
in interface JaxoObjectEditPanel
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.public final void addFillLineColorPanels(java.awt.Color color, java.awt.Color fillColor, boolean isFilled, int fillX, int fillY, int lineX, int lineY)
addFillLineColorPanels
in interface JaxoObjectEditPanel
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.public final void addColorPanel(java.awt.Color color, int type, int gridx, int gridy)
addColorPanel
in interface JaxoObjectEditPanel
color
- The color of the object to be edited by this panel.type
- The color mode.
Should be one of JaxoObjectEditPanel.TYPE_COLOR
, JaxoObjectEditPanel.TYPE_LINE_COLOR
or
JaxoObjectEditPanel.TYPE_FILL_COLOR
.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.public final void addTextPanel(java.lang.String text, int gridx, int gridy)
addTextPanel
in interface JaxoObjectEditPanel
text
- The text object to be edited by this panel.gridx
- The x position of the subpanel.gridy
- The y position of the subpanel.public final void addPSFontPanel(java.awt.Font font, int gridx, int gridy, int gridwidth)
addPSFontPanel
in interface JaxoObjectEditPanel
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.public final void addLatexAlignPanel(int allign, int gridx, int gridy)
addLatexAlignPanel
in interface JaxoObjectEditPanel
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.public final void addLatexFontSizePanel(int size, int gridx, int gridy)
addLatexFontSizePanel
in interface JaxoObjectEditPanel
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.public final void show(java.awt.Component parent, Location l)
show
in interface JaxoObjectEditPanel
parent
- The parent component for the edit panel windowl
- The location for for the edit panel windowpublic boolean hasChanged()
hasChanged
in interface JaxoObjectEditPanel
public void setTitleAndIcon(java.lang.String newTitle, java.lang.String newIcon)
setTitleAndIcon
in interface JaxoObjectEditPanel
newTitle
- the title.newIcon
- the icon.protected void resetObject()
protected final void showDialog(java.awt.Component parent, Location l)
parent
- the parent component.l
- the location.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.