|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.gui.AttribsControls
create and manage the editor attribute controls.
AttribsControls: an utility class for jfig to create and manage the attribute control GUI components, e.g. to specify font name, size, alignment, line width, style, arrow mode, line and fill colors, etc.
AttribsControls is a Singleton class, while the individual components are not. Use getAttribsControls() to initialize the Singleton.
Note that not all XFIG attributes and attribute values are supported yet, e.g. fill styles and several fonts.
To retrieve the full set of currently selected attributes for a given instance of AttribsControls, just call getValues(). To update the GUI controls from a given attribute, just call showValues( master_attributes );
Method Summary | |
void |
addUpdateModeButtonListener(java.awt.event.ActionListener AL)
|
java.awt.Panel |
buildPanel(java.awt.Component parent)
|
StateButton |
createArrowModeButton(java.awt.Component parent)
|
StateButton |
createArrowStyleButton(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createBackArrowLengthField(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createBackArrowThicknessField(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createBackArrowWidthField(java.awt.Component parent)
|
ChoiceWithHelpMessage |
createCenterFlushLeftChoice(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createDashLengthField(java.awt.Component parent)
|
NumericStateButton |
createDepthButton(java.awt.Component parent)
|
ColorStateButton |
createFillColorButton(java.awt.Component parent)
|
FillPatternButton |
createFillPatternButton(java.awt.Component parent)
|
StateButton |
createFillStyleButton(java.awt.Component parent)
|
ChoiceWithHelpMessage |
createFontFlagChoice(java.awt.Component parent)
|
FontStateButton |
createFontSelectButton(java.awt.Component parent)
|
NumericStateButton |
createFontSizeButton(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createFrontArrowLengthField(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createFrontArrowThicknessField(java.awt.Component parent)
|
TextFieldWithHelpMessage |
createFrontArrowWidthField(java.awt.Component parent)
|
ChoiceWithHelpMessage |
createLandscapePortraitChoice(java.awt.Component parent)
|
ColorStateButton |
createLineColorButton(java.awt.Component parent)
|
StateButton |
createLineStyleButton(java.awt.Component parent)
|
StateButton |
createLineWidthButton(java.awt.Component parent)
|
StateButton |
createObjectAlignXButton(java.awt.Component parent)
|
StateButton |
createObjectAlignYButton(java.awt.Component parent)
|
NumericStateButton |
createRotationButton(java.awt.Component parent)
|
NumericStateButton |
createRoundRectButton(java.awt.Component parent)
|
StateButton |
createSmartLinksButton(java.awt.Component parent)
|
StateButton |
createSnapModeButton(java.awt.Component parent)
|
StateButton |
createTextAlignButton(java.awt.Component parent)
|
StateButton |
createUpdateMaskButton(java.awt.Component parent,
java.lang.String callback,
java.lang.String helpMessage)
|
UpdateModeButton |
createUpdateModeButton(java.awt.Component parent)
|
void |
dbg(java.lang.String msg)
|
static AttribsControls |
getAttribsControls(FigBasicEditor editor)
create a return a collection of all FIG attribute controls (e.g. |
java.awt.Point[] |
getCoords(java.lang.String s)
parse the text from the coordsTextArea and reconstruct the world coordinates, put them into an array and return a reference to this array. |
int |
getObjectAlignXMode()
|
int |
getObjectAlignYMode()
|
int |
getSmartLinksMode()
|
FigAttribs |
getValues(FigAttribs attr)
getValues --- set the values for 'attr' from the currently selected GUI values. |
void |
invertUpdateStatus()
|
static void |
main(java.lang.String[] argv)
simple self test |
static void |
msg(java.lang.String msg)
|
void |
retrievePoints(FigObject object,
java.awt.TextArea coordsTextArea)
|
void |
retrievePoints(FigObject object,
java.awt.TextField coordsTextField)
|
void |
selectFont(FigAttribs attr,
FontStateButton fontSelectButton)
|
void |
setArrowMode(FigAttribs attr,
StateButton arrowModeButton)
the arrowModeButton has icons 'none', 'forward', 'backward', 'both' |
void |
setArrowStyle(FigAttribs attr,
StateButton arrowStyleButton)
the arrowStyleButton has icons 'simple arrow' ... |
void |
setBArrowLength(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setBArrowThickness(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setBArrowWidth(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setCornerRadius(FigAttribs attr,
NumericStateButton roundRectButton)
cornerRadius in pixels (at 2400dpi) is 96*cornerRadius in mm |
void |
setDashLength(FigAttribs attr,
TextFieldWithHelpMessage dashLengthField)
|
void |
setDepth(FigAttribs attr,
NumericStateButton depthButton)
get depth (layer) within [0 .. |
void |
setFArrowLength(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setFArrowThickness(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setFArrowWidth(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
setFillColor(FigAttribs attr,
ColorStateButton fillColorButton)
|
void |
setFillPattern(FigAttribs attr,
FillPatternButton FBP)
set the fill style / fill pattern variables in the FigAttribs "attr" object from the current settings of FillPatternButton FBP. |
void |
setFillStyleOld(FigAttribs attr,
StateButton fillStyleButton)
the fillStyleButton has icons 'none', 'solid', 'pattern' |
void |
setFontFlags(FigAttribs attr,
ChoiceWithHelpMessage fontFlagChoice)
|
void |
setFontSize(FigAttribs attr,
NumericStateButton fontSizeButton)
|
void |
setJustificationMode(FigAttribs attr,
ChoiceWithHelpMessage centerFlushLeftChoice)
|
void |
setLandscapeMode(FigAttribs attr,
ChoiceWithHelpMessage landscapePortraitChoice)
|
void |
setLineColor(FigAttribs attr,
ColorStateButton lineColorButton)
set the attribs line color to the lineColorButton selection |
void |
setLineStyle(FigAttribs attr,
StateButton lineStyleButton)
the lineStyleButton has icons 'solid', 'dashed', 'dotted' |
void |
setLineWidth(FigAttribs attr,
StateButton lineWidthButton)
|
void |
setRotationAngle(FigAttribs attr,
NumericStateButton rotationAngleButton)
|
void |
setSnapMode(FigAttribs attr,
StateButton snapModeButton)
|
void |
setStatusMessage(StatusMessage _helper)
|
void |
setTextAlignment(FigAttribs attr,
StateButton textAlignButton)
the textAlignButton has icons 'left', 'center', 'right' |
void |
setUpdateMode(boolean enable)
|
void |
setUpdateStatusAll()
|
void |
setUpdateStatusNone()
|
void |
showArrowMode(FigAttribs attr,
StateButton arrowModeButton)
|
void |
showArrowStyle(FigAttribs attr,
StateButton arrowStyleButton)
|
void |
showBArrowLength(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showBArrowThickness(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showBArrowWidth(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showCoords(java.awt.Point[] wcp,
java.awt.TextArea coordsTextArea)
display the (2400 dpi world) coordinates given by the Points in wcp[] in editable form in our coordsTextArea. |
void |
showCoords(java.awt.Point[] wcp,
java.awt.TextField coordsTextField)
|
void |
showCoords(java.awt.Point wcp,
java.awt.TextField coordsTextField)
|
void |
showCornerRadius(FigAttribs attr,
NumericStateButton roundRectButton)
|
void |
showDashLength(FigAttribs attr,
TextFieldWithHelpMessage dashLengthField)
|
void |
showDepth(FigAttribs attr,
NumericStateButton depthButton)
|
void |
showFArrowLength(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showFArrowThickness(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showFArrowWidth(FigAttribs attr,
TextFieldWithHelpMessage field)
|
void |
showFillColor(FigAttribs attr,
ColorStateButton fillColorButton)
|
void |
showFillPattern(FigAttribs attr,
FillPatternButton FPB)
|
void |
showFillStyle(FigAttribs attr,
StateButton fillStyleButton)
|
void |
showFontFlags(FigAttribs attr,
ChoiceWithHelpMessage fontFlagChoice)
|
void |
showFontName(FigAttribs attr,
FontStateButton fontButton)
|
void |
showFontSize(FigAttribs attr,
NumericStateButton fontSizeButton)
|
void |
showJustificationMode(FigAttribs attr,
ChoiceWithHelpMessage centerFlushLeftChoice)
|
void |
showLandscapeMode(FigAttribs attr,
ChoiceWithHelpMessage landscapePortraitChoice)
|
void |
showLineColor(FigAttribs attr,
ColorStateButton lineColorButton)
|
void |
showLineStyle(FigAttribs attr,
StateButton lineStyleButton)
|
void |
showLineWidth(FigAttribs attr,
StateButton lineWidthButton)
set current line Width, lineWidthButton has icons '0' '1' .. |
void |
showRotationAngle(FigAttribs attr,
NumericStateButton rotationAngleButton)
|
void |
showTextAlignment(FigAttribs attr,
StateButton textAlignButton)
|
void |
showValues(FigAttribs attr)
update all the GUI controls to reflect the current attribute values from object 'attr' |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
boolean debug
UpdateModeButton updateModeButton
StateButton snapModeButton
ChoiceWithHelpMessage landscapePortraitChoice
ChoiceWithHelpMessage centerFlushLeftChoice
StateButton lineStyleButton
StateButton lineWidthButton
ColorStateButton lineColorButton
StateButton arrowModeButton
StateButton arrowStyleButton
StateButton fillStyleButton
FillPatternButton fillPatternButton
ColorStateButton fillColorButton
StateButton textAlignButton
FontStateButton fontSelectButton
NumericStateButton fontSizeButton
ChoiceWithHelpMessage fontFlagChoice
StateButton objectAlignXButton
StateButton objectAlignYButton
NumericStateButton roundRectButton
NumericStateButton depthButton
TextFieldWithHelpMessage dashLengthField
NumericStateButton rotationAngleButton
StateButton smartLinksButton
ColorCache colorCache
StatusMessage helper
java.awt.Image allicons
java.awt.Image[] iconImages
Method Detail |
public static AttribsControls getAttribsControls(FigBasicEditor editor)
public void setStatusMessage(StatusMessage _helper)
public UpdateModeButton createUpdateModeButton(java.awt.Component parent)
public StateButton createLineStyleButton(java.awt.Component parent)
public ColorStateButton createLineColorButton(java.awt.Component parent)
public FillPatternButton createFillPatternButton(java.awt.Component parent)
public StateButton createFillStyleButton(java.awt.Component parent)
public StateButton createSmartLinksButton(java.awt.Component parent)
public ColorStateButton createFillColorButton(java.awt.Component parent)
public StateButton createArrowStyleButton(java.awt.Component parent)
public StateButton createArrowModeButton(java.awt.Component parent)
public TextFieldWithHelpMessage createFrontArrowWidthField(java.awt.Component parent)
public TextFieldWithHelpMessage createFrontArrowLengthField(java.awt.Component parent)
public TextFieldWithHelpMessage createFrontArrowThicknessField(java.awt.Component parent)
public TextFieldWithHelpMessage createBackArrowWidthField(java.awt.Component parent)
public TextFieldWithHelpMessage createBackArrowLengthField(java.awt.Component parent)
public TextFieldWithHelpMessage createBackArrowThicknessField(java.awt.Component parent)
public StateButton createTextAlignButton(java.awt.Component parent)
public FontStateButton createFontSelectButton(java.awt.Component parent)
public NumericStateButton createFontSizeButton(java.awt.Component parent)
public ChoiceWithHelpMessage createFontFlagChoice(java.awt.Component parent)
public StateButton createLineWidthButton(java.awt.Component parent)
public NumericStateButton createRoundRectButton(java.awt.Component parent)
public NumericStateButton createDepthButton(java.awt.Component parent)
public TextFieldWithHelpMessage createDashLengthField(java.awt.Component parent)
public StateButton createSnapModeButton(java.awt.Component parent)
public StateButton createObjectAlignXButton(java.awt.Component parent)
public StateButton createObjectAlignYButton(java.awt.Component parent)
public NumericStateButton createRotationButton(java.awt.Component parent)
public ChoiceWithHelpMessage createLandscapePortraitChoice(java.awt.Component parent)
public ChoiceWithHelpMessage createCenterFlushLeftChoice(java.awt.Component parent)
public StateButton createUpdateMaskButton(java.awt.Component parent, java.lang.String callback, java.lang.String helpMessage)
public java.awt.Panel buildPanel(java.awt.Component parent)
public int getObjectAlignXMode()
public int getObjectAlignYMode()
public int getSmartLinksMode()
public FigAttribs getValues(FigAttribs attr)
attr
- the FigAttribs class object to modify. A new
object will be created if this parameter is null.
public void setDepth(FigAttribs attr, NumericStateButton depthButton)
public void setDashLength(FigAttribs attr, TextFieldWithHelpMessage dashLengthField)
public void setLineWidth(FigAttribs attr, StateButton lineWidthButton)
public void setLineStyle(FigAttribs attr, StateButton lineStyleButton)
public void setCornerRadius(FigAttribs attr, NumericStateButton roundRectButton)
public void setLineColor(FigAttribs attr, ColorStateButton lineColorButton)
public void setFillColor(FigAttribs attr, ColorStateButton fillColorButton)
public void setFillPattern(FigAttribs attr, FillPatternButton FBP)
public void setFillStyleOld(FigAttribs attr, StateButton fillStyleButton)
public void setArrowStyle(FigAttribs attr, StateButton arrowStyleButton)
public void setFArrowWidth(FigAttribs attr, TextFieldWithHelpMessage field)
public void setFArrowLength(FigAttribs attr, TextFieldWithHelpMessage field)
public void setFArrowThickness(FigAttribs attr, TextFieldWithHelpMessage field)
public void setBArrowWidth(FigAttribs attr, TextFieldWithHelpMessage field)
public void setBArrowLength(FigAttribs attr, TextFieldWithHelpMessage field)
public void setBArrowThickness(FigAttribs attr, TextFieldWithHelpMessage field)
public void setArrowMode(FigAttribs attr, StateButton arrowModeButton)
public void setTextAlignment(FigAttribs attr, StateButton textAlignButton)
public void setFontSize(FigAttribs attr, NumericStateButton fontSizeButton)
public void setFontFlags(FigAttribs attr, ChoiceWithHelpMessage fontFlagChoice)
public void selectFont(FigAttribs attr, FontStateButton fontSelectButton)
public void setSnapMode(FigAttribs attr, StateButton snapModeButton)
public void setLandscapeMode(FigAttribs attr, ChoiceWithHelpMessage landscapePortraitChoice)
public void setJustificationMode(FigAttribs attr, ChoiceWithHelpMessage centerFlushLeftChoice)
public void setRotationAngle(FigAttribs attr, NumericStateButton rotationAngleButton)
public void showValues(FigAttribs attr)
public void showDepth(FigAttribs attr, NumericStateButton depthButton)
public void showDashLength(FigAttribs attr, TextFieldWithHelpMessage dashLengthField)
public void showLineWidth(FigAttribs attr, StateButton lineWidthButton)
public void showLineStyle(FigAttribs attr, StateButton lineStyleButton)
public void showLineColor(FigAttribs attr, ColorStateButton lineColorButton)
public void showFillPattern(FigAttribs attr, FillPatternButton FPB)
public void showFillStyle(FigAttribs attr, StateButton fillStyleButton)
public void showFillColor(FigAttribs attr, ColorStateButton fillColorButton)
public void showArrowMode(FigAttribs attr, StateButton arrowModeButton)
public void showArrowStyle(FigAttribs attr, StateButton arrowStyleButton)
public void showFArrowWidth(FigAttribs attr, TextFieldWithHelpMessage field)
public void showFArrowLength(FigAttribs attr, TextFieldWithHelpMessage field)
public void showBArrowWidth(FigAttribs attr, TextFieldWithHelpMessage field)
public void showBArrowLength(FigAttribs attr, TextFieldWithHelpMessage field)
public void showFArrowThickness(FigAttribs attr, TextFieldWithHelpMessage field)
public void showBArrowThickness(FigAttribs attr, TextFieldWithHelpMessage field)
public void showTextAlignment(FigAttribs attr, StateButton textAlignButton)
public void showFontSize(FigAttribs attr, NumericStateButton fontSizeButton)
public void showFontFlags(FigAttribs attr, ChoiceWithHelpMessage fontFlagChoice)
public void showCornerRadius(FigAttribs attr, NumericStateButton roundRectButton)
public void showFontName(FigAttribs attr, FontStateButton fontButton)
public void showLandscapeMode(FigAttribs attr, ChoiceWithHelpMessage landscapePortraitChoice)
public void showJustificationMode(FigAttribs attr, ChoiceWithHelpMessage centerFlushLeftChoice)
public void showRotationAngle(FigAttribs attr, NumericStateButton rotationAngleButton)
public void setUpdateMode(boolean enable)
public void setUpdateStatusAll()
public void setUpdateStatusNone()
public void invertUpdateStatus()
public void addUpdateModeButtonListener(java.awt.event.ActionListener AL)
public void showCoords(java.awt.Point[] wcp, java.awt.TextArea coordsTextArea)
public void showCoords(java.awt.Point[] wcp, java.awt.TextField coordsTextField)
public void showCoords(java.awt.Point wcp, java.awt.TextField coordsTextField)
public void retrievePoints(FigObject object, java.awt.TextArea coordsTextArea)
public void retrievePoints(FigObject object, java.awt.TextField coordsTextField)
public java.awt.Point[] getCoords(java.lang.String s)
public static void msg(java.lang.String msg)
public void dbg(java.lang.String msg)
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |