jfig.gui
Class AttribsButtonPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjfig.gui.InsetsPanel
                  extended byjfig.gui.AttribsButtonPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class AttribsButtonPanel
extends InsetsPanel

user interface container for the editor attribute controls.

AttribsButtonPanel: 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, e.g. fill patterns and several fonts.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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)  AttribsControls AC
           
(package private)  StateButton arrowModeButton
           
(package private)  StateButton arrowStyleButton
           
(package private)  FigAttribs attr
           
(package private)  NumericStateButton cornerRadiusButton
           
(package private) static boolean debug
           
(package private)  NumericStateButton depthButton
           
(package private)  ColorStateButton fillColorButton
           
(package private)  FillPatternButton fillPatternButton
           
(package private)  ChoiceWithHelpMessage fontFlagChoice
           
(package private)  StateButton fontFlagMask
           
(package private)  FontStateButton fontSelectButton
           
(package private)  NumericStateButton fontSizeButton
           
(package private)  StatusMessage helper
           
(package private)  ColorStateButton lineColorButton
           
(package private)  StateButton lineStyleButton
           
(package private)  StateButton lineWidthButton
           
(package private)  StateButton objectAlignXButton
           
(package private)  StateButton objectAlignYButton
           
(package private)  NumericStateButton rotationAngleButton
           
(package private)  StateButton smartLinksButton
           
(package private)  StateButton textAlignButton
           
(package private)  UpdateModeButton 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 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
AttribsButtonPanel(FigBasicEditor editor, StatusMessage helper, FigAttribs attribs)
          AttribsButtonPanel default constructor.
 
Method Summary
 void addUpdateModeButtonListener(java.awt.event.ActionListener AL)
           
static void dbg(java.lang.String msg)
           
 java.awt.Font getFont()
           
 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 jfig.gui.InsetsPanel
getInsets, paint, setLowered, setNormal, setRaised
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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

AttribsControls AC

helper

StatusMessage helper

updateModeButton

UpdateModeButton updateModeButton

lineStyleButton

StateButton lineStyleButton

lineWidthButton

StateButton lineWidthButton

lineColorButton

ColorStateButton lineColorButton

arrowModeButton

StateButton arrowModeButton

arrowStyleButton

StateButton arrowStyleButton

fillColorButton

ColorStateButton fillColorButton

fillPatternButton

FillPatternButton fillPatternButton

fontSelectButton

FontStateButton fontSelectButton

fontSizeButton

NumericStateButton fontSizeButton

textAlignButton

StateButton textAlignButton

fontFlagMask

StateButton fontFlagMask

fontFlagChoice

ChoiceWithHelpMessage fontFlagChoice

cornerRadiusButton

NumericStateButton cornerRadiusButton

depthButton

NumericStateButton depthButton

objectAlignXButton

StateButton objectAlignXButton

objectAlignYButton

StateButton objectAlignYButton

rotationAngleButton

NumericStateButton rotationAngleButton

smartLinksButton

StateButton smartLinksButton

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

AttribsButtonPanel

public AttribsButtonPanel(FigBasicEditor editor,
                          StatusMessage helper,
                          FigAttribs attribs)
AttribsButtonPanel 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

getFont

public java.awt.Font getFont()

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()

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