jfig.gui
Class JAttribsButtonPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byjfig.gui.JAttribsButtonPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class JAttribsButtonPanel
extends javax.swing.JPanel

Swing-based user interface container for the jfig editor attribute controls.

JAttribsButtonPanel: the jfig user interface container for all attribute controls (choice menus, textfields, status and color buttons) for font style, size, alignment, object line and fill colors, line width, style, arrow mode and style, object layer.

Note that not all XFIG attributes and attribute values are supported yet.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  JAttribsControlsFactory AC
           
(package private)  JStateButton arrowModeButton
           
(package private)  JStateButton arrowStyleButton
           
(package private)  FigAttribs attr
           
(package private)  JNumericStateButton cornerRadiusButton
           
(package private) static boolean debug
           
(package private)  JNumericStateButton depthButton
           
(package private)  JColorButton fillColorButton
           
(package private)  JFillPatternButton fillPatternButton
           
(package private)  JStateButton fontFlagButton
           
(package private)  javax.swing.JComboBox fontFlagChoice
           
(package private)  JStateButton fontFlagMask
           
(package private)  JFontButton fontSelectButton
           
(package private)  JNumericStateButton fontSizeButton
           
(package private)  JStateButton geometryButton
           
(package private)  javax.swing.JLabel geometryLabel
           
(package private)  StatusMessage helper
           
(package private)  JColorButton lineColorButton
           
(package private)  JStateButton lineStyleButton
           
(package private)  JStateButton lineWidthButton
           
(package private)  JStateButton objectAlignXButton
           
(package private)  JStateButton objectAlignYButton
           
(package private)  JNumericStateButton rotationAngleButton
           
(package private)  JStateButton smartLinksButton
           
(package private)  JStateButton textAlignButton
           
(package private)  JUpdateModeButton updateModeButton
           
(package private) static int[][] visibilityMatrix
           
(package private) static int VISIBLE_ALIGN
           
(package private) static int VISIBLE_ALL
           
(package private) static int VISIBLE_COMPOUND
           
(package private) static int VISIBLE_CONVERT
           
(package private) static int VISIBLE_COPY
           
(package private) static int VISIBLE_DELETE
           
(package private) static int VISIBLE_DELETEPOINT
           
(package private) static int VISIBLE_EDIT
           
(package private) static int VISIBLE_ELLIPSE
           
(package private) static int VISIBLE_IMAGE
           
(package private) static int VISIBLE_INSERTPOINT
           
(package private) static int VISIBLE_MIRRORX
           
(package private) static int VISIBLE_MIRRORY
           
(package private) static int VISIBLE_MOVE
           
(package private) static int VISIBLE_MOVEPOINT
           
(package private) static int VISIBLE_NONE
           
(package private) static int VISIBLE_POLYLINE
           
(package private) static int VISIBLE_RECTANGLE
           
(package private) static int VISIBLE_ROTATE_LEFT
           
(package private) static int VISIBLE_ROTATE_RIGHT
           
(package private) static int VISIBLE_ROUND_RECT
           
(package private) static int VISIBLE_SCALE
           
(package private) static int VISIBLE_SCALE_TEXT
           
(package private) static int VISIBLE_SPLINE
           
(package private) static int VISIBLE_TEXT
           
(package private) static int VISIBLE_TRIGGER
           
 
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.Container
 
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
JAttribsButtonPanel(FigBasicEditor editor, StatusMessage helper, FigAttribs attribs)
          JAttribsButtonPanel default constructor.
 
Method Summary
 void addUpdateModeButtonListener(java.awt.event.ActionListener AL)
           
static void dbg(java.lang.String msg)
           
 int getGeometryMode()
           
 int getObjectAlignmentModeX()
           
 int getObjectAlignmentModeY()
           
 int getSmartLinksMode()
           
 FigAttribs getValues(FigAttribs attr)
          getValues --- set the values for 'attr' from the currently selected GUI values.
 void hideAllControls()
           
 void invertUpdateStatus()
           
static void main(java.lang.String[] argv)
          simple self test
static void message(java.lang.String msg)
           
 void repaintAll()
           
 void setUpdateMode(boolean enable)
           
 void setUpdateStatusAll()
           
 void setUpdateStatusNone()
           
 void showAlignControls()
           
 void showAllControls()
           
 void showCopyControls()
           
 void showCreateEllipseControls()
           
 void showCreateImageControls()
           
 void showCreatePolylineControls()
           
 void showCreateRectangleControls()
           
 void showCreateRoundRectangleControls()
           
 void showCreateSplineControls()
           
 void showCreateTextControls()
           
 void showMoveControls()
           
 void showRotateControls()
           
 void showValues(FigAttribs attr)
           
 void update(FigAttribs attribs)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

static boolean debug

attr

FigAttribs attr

AC

JAttribsControlsFactory AC

helper

StatusMessage helper

updateModeButton

JUpdateModeButton updateModeButton

lineStyleButton

JStateButton lineStyleButton

lineWidthButton

JStateButton lineWidthButton

lineColorButton

JColorButton lineColorButton

arrowModeButton

JStateButton arrowModeButton

arrowStyleButton

JStateButton arrowStyleButton

fillColorButton

JColorButton fillColorButton

fillPatternButton

JFillPatternButton fillPatternButton

fontSelectButton

JFontButton fontSelectButton

fontSizeButton

JNumericStateButton fontSizeButton

textAlignButton

JStateButton textAlignButton

fontFlagMask

JStateButton fontFlagMask

fontFlagButton

JStateButton fontFlagButton

fontFlagChoice

javax.swing.JComboBox fontFlagChoice

cornerRadiusButton

JNumericStateButton cornerRadiusButton

depthButton

JNumericStateButton depthButton

objectAlignXButton

JStateButton objectAlignXButton

objectAlignYButton

JStateButton objectAlignYButton

rotationAngleButton

JNumericStateButton rotationAngleButton

smartLinksButton

JStateButton smartLinksButton

geometryButton

JStateButton geometryButton

geometryLabel

javax.swing.JLabel geometryLabel

VISIBLE_NONE

static final int VISIBLE_NONE
See Also:
Constant Field Values

VISIBLE_ALL

static final int VISIBLE_ALL
See Also:
Constant Field Values

VISIBLE_POLYLINE

static final int VISIBLE_POLYLINE
See Also:
Constant Field Values

VISIBLE_RECTANGLE

static final int VISIBLE_RECTANGLE
See Also:
Constant Field Values

VISIBLE_ROUND_RECT

static final int VISIBLE_ROUND_RECT
See Also:
Constant Field Values

VISIBLE_IMAGE

static final int VISIBLE_IMAGE
See Also:
Constant Field Values

VISIBLE_ELLIPSE

static final int VISIBLE_ELLIPSE
See Also:
Constant Field Values

VISIBLE_TEXT

static final int VISIBLE_TEXT
See Also:
Constant Field Values

VISIBLE_TRIGGER

static final int VISIBLE_TRIGGER
See Also:
Constant Field Values

VISIBLE_COMPOUND

static final int VISIBLE_COMPOUND
See Also:
Constant Field Values

VISIBLE_SCALE

static final int VISIBLE_SCALE
See Also:
Constant Field Values

VISIBLE_ALIGN

static final int VISIBLE_ALIGN
See Also:
Constant Field Values

VISIBLE_MOVE

static final int VISIBLE_MOVE
See Also:
Constant Field Values

VISIBLE_COPY

static final int VISIBLE_COPY
See Also:
Constant Field Values

VISIBLE_DELETE

static final int VISIBLE_DELETE
See Also:
Constant Field Values

VISIBLE_MOVEPOINT

static final int VISIBLE_MOVEPOINT
See Also:
Constant Field Values

VISIBLE_INSERTPOINT

static final int VISIBLE_INSERTPOINT
See Also:
Constant Field Values

VISIBLE_DELETEPOINT

static final int VISIBLE_DELETEPOINT
See Also:
Constant Field Values

VISIBLE_EDIT

static final int VISIBLE_EDIT
See Also:
Constant Field Values

VISIBLE_MIRRORX

static final int VISIBLE_MIRRORX
See Also:
Constant Field Values

VISIBLE_MIRRORY

static final int VISIBLE_MIRRORY
See Also:
Constant Field Values

VISIBLE_ROTATE_LEFT

static final int VISIBLE_ROTATE_LEFT
See Also:
Constant Field Values

VISIBLE_ROTATE_RIGHT

static final int VISIBLE_ROTATE_RIGHT
See Also:
Constant Field Values

VISIBLE_SCALE_TEXT

static final int VISIBLE_SCALE_TEXT
See Also:
Constant Field Values

VISIBLE_CONVERT

static final int VISIBLE_CONVERT
See Also:
Constant Field Values

VISIBLE_SPLINE

static final int VISIBLE_SPLINE
See Also:
Constant Field Values

visibilityMatrix

static int[][] visibilityMatrix
Constructor Detail

JAttribsButtonPanel

public JAttribsButtonPanel(FigBasicEditor editor,
                           StatusMessage helper,
                           FigAttribs attribs)
JAttribsButtonPanel default constructor. Build a panel with all necessary buttons, choice menus and text fields. Initialize with the values from attribs. Print status (and bubble-help) messages to 'helper'.

Parameters:
attribs - The initial editor and object attributes.
Method Detail

getValues

public FigAttribs getValues(FigAttribs attr)
getValues --- set the values for 'attr' from the currently selected GUI values.

Parameters:
attr - the FigAttribs class object to modify. A new object will be created if this parameter is null.
Returns:
values a FigAttribs class object with all attributes.

getSmartLinksMode

public int getSmartLinksMode()

getObjectAlignmentModeX

public int getObjectAlignmentModeX()

getObjectAlignmentModeY

public int getObjectAlignmentModeY()

getGeometryMode

public int getGeometryMode()

update

public void update(FigAttribs attribs)

showValues

public void showValues(FigAttribs attr)

setUpdateMode

public void setUpdateMode(boolean enable)

setUpdateStatusAll

public void setUpdateStatusAll()

setUpdateStatusNone

public void setUpdateStatusNone()

invertUpdateStatus

public void invertUpdateStatus()

addUpdateModeButtonListener

public void addUpdateModeButtonListener(java.awt.event.ActionListener AL)

showAllControls

public void showAllControls()

hideAllControls

public void hideAllControls()

showCreateTextControls

public void showCreateTextControls()

showRotateControls

public void showRotateControls()

showCreatePolylineControls

public void showCreatePolylineControls()

showCreateSplineControls

public void showCreateSplineControls()

showCreateEllipseControls

public void showCreateEllipseControls()

showCreateRectangleControls

public void showCreateRectangleControls()

showCreateRoundRectangleControls

public void showCreateRoundRectangleControls()

showCreateImageControls

public void showCreateImageControls()

showMoveControls

public void showMoveControls()

showCopyControls

public void showCopyControls()

showAlignControls

public void showAlignControls()

repaintAll

public void repaintAll()

message

public static void message(java.lang.String msg)

dbg

public static void dbg(java.lang.String msg)

main

public static void main(java.lang.String[] argv)
simple self test