|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jfig.gui.JAttribsControlsFactory
create and manage the jfig editor attribute controls.
JAttribsControlsFactory: 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.
JAttribsControlsFactory is a Singleton class, while the individual components are not. Use getJAttribsControlsFactory() 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 JAttribsControlsFactory, just call getValues(). To update the GUI controls from a given attribute, just call showValues( master_attributes );
The default background color to be used for transparent pixels on the several button's icons is taken from the "jfig.gui.Editor.BackgroundColor" property if set, or the platform's default background color if not set.
Field Summary | |
(package private) java.awt.Image |
allIcons
|
(package private) JStateButton |
arrowModeButton
|
(package private) JStateButton |
arrowStyleButton
|
(package private) java.awt.Color |
backgroundColor
|
(package private) javax.swing.JComboBox |
centerFlushLeftChoice
|
(package private) ColorCache |
colorCache
|
(package private) javax.swing.JTextField |
dashLengthField
|
(package private) boolean |
debug
|
(package private) JNumericStateButton |
depthButton
|
(package private) JColorButton |
fillColorButton
|
(package private) JFillPatternButton |
fillPatternButton
|
(package private) JStateButton |
fillStyleButton
|
(package private) JStateButton |
fontFlagButton
|
(package private) javax.swing.JComboBox |
fontFlagChoice
|
(package private) JFontButton |
fontSelectButton
|
(package private) JNumericStateButton |
fontSizeButton
|
(package private) JStateButton |
geometryButton
|
(package private) java.awt.Image |
geometryIcons
|
(package private) StatusMessage |
helper
|
(package private) java.awt.Image[] |
iconImages
|
(package private) javax.swing.JComboBox |
landscapePortraitChoice
|
(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) JNumericStateButton |
roundRectButton
|
(package private) JStateButton |
smartLinksButton
|
(package private) JStateButton |
snapModeButton
|
(package private) JStateButton |
textAlignButton
|
(package private) JUpdateModeButton |
updateModeButton
|
Method Summary | |
void |
addUpdateModeButtonListener(java.awt.event.ActionListener AL)
|
javax.swing.JPanel |
buildPanel(java.awt.Component parent)
|
JStateButton |
createArrowModeButton(java.awt.Component parent)
|
JStateButton |
createArrowStyleButton(java.awt.Component parent)
|
javax.swing.JTextField |
createBackArrowLengthField(java.awt.Component parent)
|
javax.swing.JTextField |
createBackArrowThicknessField(java.awt.Component parent)
|
javax.swing.JTextField |
createBackArrowWidthField(java.awt.Component parent)
|
javax.swing.JComboBox |
createCenterFlushLeftChoice(java.awt.Component parent)
|
javax.swing.JTextField |
createDashLengthField(java.awt.Component parent)
|
JNumericStateButton |
createDepthButton(java.awt.Component parent)
|
JColorButton |
createFillColorButton(java.awt.Component parent)
|
JFillPatternButton |
createFillPatternButton(java.awt.Component parent)
|
JStateButton |
createFillStyleButton(java.awt.Component parent)
|
JStateButton |
createFontFlagButton(java.awt.Component parent)
|
javax.swing.JComboBox |
createFontFlagChoice(java.awt.Component parent)
|
JFontButton |
createFontSelectButton(java.awt.Component parent)
|
JNumericStateButton |
createFontSizeButton(java.awt.Component parent)
|
javax.swing.JTextField |
createFrontArrowLengthField(java.awt.Component parent)
|
javax.swing.JTextField |
createFrontArrowThicknessField(java.awt.Component parent)
|
javax.swing.JTextField |
createFrontArrowWidthField(java.awt.Component parent)
|
JStateButton |
createGeometryButton(java.awt.Component parent)
|
javax.swing.JComboBox |
createLandscapePortraitChoice(java.awt.Component parent)
|
JColorButton |
createLineColorButton(java.awt.Component parent)
|
JStateButton |
createLineStyleButton(java.awt.Component parent)
|
JStateButton |
createLineWidthButton(java.awt.Component parent)
|
JStateButton |
createObjectAlignXButton(java.awt.Component parent)
|
JStateButton |
createObjectAlignYButton(java.awt.Component parent)
|
JNumericStateButton |
createRotationButton(java.awt.Component parent)
|
JNumericStateButton |
createRoundRectButton(java.awt.Component parent)
|
JStateButton |
createSmartLinksButton(java.awt.Component parent)
|
JStateButton |
createSnapModeButton(java.awt.Component parent)
|
JStateButton |
createTextAlignButton(java.awt.Component parent)
|
JStateButton |
createUpdateMaskButton(java.awt.Component parent,
java.lang.String callback,
java.lang.String helpMessage)
|
JUpdateModeButton |
createUpdateModeButton(java.awt.Component parent)
create the special button used to select the update mask status, states are "none", "all", "invert current status". |
void |
dbg(java.lang.String msg)
|
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 |
getGeometryMode()
|
static JAttribsControlsFactory |
getJAttribsControlsFactory(FigBasicEditor editor)
create a return a collection of all FIG attribute controls (e.g. |
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,
javax.swing.JTextArea coordsTextArea)
|
void |
retrievePoints(FigObject object,
javax.swing.JTextField coordsTextField)
|
void |
selectFont(FigAttribs attr,
JFontButton fontSelectButton)
|
void |
setArrowMode(FigAttribs attr,
JStateButton arrowModeButton)
the arrowModeButton has icons 'none', 'forward', 'backward', 'both' |
void |
setArrowStyle(FigAttribs attr,
JStateButton arrowStyleButton)
the arrowStyleButton has icons 'simple arrow' ... |
void |
setBArrowLength(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setBArrowThickness(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setBArrowWidth(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setCornerRadius(FigAttribs attr,
JNumericStateButton roundRectButton)
cornerRadius in pixels (at 2400dpi) is 96*cornerRadius in mm |
void |
setDashLength(FigAttribs attr,
javax.swing.JTextField dashLengthField)
|
void |
setDepth(FigAttribs attr,
JNumericStateButton depthButton)
get depth (layer) within [0 .. |
void |
setFArrowLength(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setFArrowThickness(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setFArrowWidth(FigAttribs attr,
javax.swing.JTextField field)
|
void |
setFillColor(FigAttribs attr,
JColorButton fillColorButton)
|
void |
setFillPattern(FigAttribs attr,
JFillPatternButton FBP)
set the fill style / fill pattern variables in the FigAttribs "attr" object from the current settings of FillPatternButton FBP. |
void |
setFillStyleOld(FigAttribs attr,
JStateButton fillStyleButton)
the fillStyleButton has icons 'none', 'solid', 'pattern' |
void |
setFontFlags(FigAttribs attr,
javax.swing.JComboBox fontFlagChoice)
|
void |
setFontFlags(FigAttribs attr,
JStateButton fontFlagButton)
|
void |
setFontSize(FigAttribs attr,
JNumericStateButton fontSizeButton)
|
void |
setJustificationMode(FigAttribs attr,
javax.swing.JComboBox centerFlushLeftChoice)
|
void |
setLandscapeMode(FigAttribs attr,
javax.swing.JComboBox landscapePortraitChoice)
|
void |
setLineColor(FigAttribs attr,
JColorButton lineColorButton)
set the attribs line color to the lineColorButton selection |
void |
setLineStyle(FigAttribs attr,
JStateButton lineStyleButton)
the lineStyleButton has icons 'solid', 'dashed', 'dotted' |
void |
setLineWidth(FigAttribs attr,
JStateButton lineWidthButton)
|
void |
setRotationAngle(FigAttribs attr,
JNumericStateButton rotationAngleButton)
|
void |
setSnapMode(FigAttribs attr,
JStateButton snapModeButton)
|
void |
setStatusMessage(StatusMessage _helper)
|
void |
setTextAlignment(FigAttribs attr,
JStateButton textAlignButton)
the textAlignButton has icons 'left', 'center', 'right' |
void |
setUpdateMode(boolean enable)
|
void |
setUpdateStatusAll()
|
void |
setUpdateStatusNone()
|
void |
showArrowMode(FigAttribs attr,
JStateButton arrowModeButton)
|
void |
showArrowStyle(FigAttribs attr,
JStateButton arrowStyleButton)
|
void |
showBArrowLength(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showBArrowThickness(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showBArrowWidth(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showCoords(java.awt.Point[] wcp,
javax.swing.JTextArea 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,
javax.swing.JTextField coordsTextField)
|
void |
showCoords(java.awt.Point wcp,
javax.swing.JTextField coordsTextField)
|
void |
showCornerRadius(FigAttribs attr,
JNumericStateButton roundRectButton)
|
void |
showDashLength(FigAttribs attr,
javax.swing.JTextField dashLengthField)
|
void |
showDepth(FigAttribs attr,
JNumericStateButton depthButton)
|
void |
showFArrowLength(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showFArrowThickness(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showFArrowWidth(FigAttribs attr,
javax.swing.JTextField field)
|
void |
showFillColor(FigAttribs attr,
JColorButton fillColorButton)
|
void |
showFillPattern(FigAttribs attr,
JFillPatternButton FPB)
|
void |
showFillStyle(FigAttribs attr,
JStateButton fillStyleButton)
|
void |
showFontFlags(FigAttribs attr,
javax.swing.JComboBox fontFlagChoice)
|
void |
showFontFlags(FigAttribs attr,
JStateButton fontFlagButton)
|
void |
showFontName(FigAttribs attr,
JFontButton fontButton)
|
void |
showFontSize(FigAttribs attr,
JNumericStateButton fontSizeButton)
|
void |
showJustificationMode(FigAttribs attr,
javax.swing.JComboBox centerFlushLeftChoice)
|
void |
showLandscapeMode(FigAttribs attr,
javax.swing.JComboBox landscapePortraitChoice)
|
void |
showLineColor(FigAttribs attr,
JColorButton lineColorButton)
|
void |
showLineStyle(FigAttribs attr,
JStateButton lineStyleButton)
|
void |
showLineWidth(FigAttribs attr,
JStateButton lineWidthButton)
set current line Width, lineWidthButton has icons '0' '1' .. |
void |
showRotationAngle(FigAttribs attr,
JNumericStateButton rotationAngleButton)
|
void |
showTextAlignment(FigAttribs attr,
JStateButton 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
JUpdateModeButton updateModeButton
JStateButton snapModeButton
javax.swing.JComboBox landscapePortraitChoice
javax.swing.JComboBox centerFlushLeftChoice
JStateButton lineStyleButton
JStateButton lineWidthButton
JColorButton lineColorButton
JStateButton geometryButton
JStateButton arrowModeButton
JStateButton arrowStyleButton
JStateButton fillStyleButton
JFillPatternButton fillPatternButton
JColorButton fillColorButton
JStateButton textAlignButton
JFontButton fontSelectButton
JNumericStateButton fontSizeButton
JStateButton fontFlagButton
javax.swing.JComboBox fontFlagChoice
JStateButton objectAlignXButton
JStateButton objectAlignYButton
JNumericStateButton roundRectButton
JNumericStateButton depthButton
javax.swing.JTextField dashLengthField
JNumericStateButton rotationAngleButton
JStateButton smartLinksButton
ColorCache colorCache
StatusMessage helper
java.awt.Color backgroundColor
java.awt.Image allIcons
java.awt.Image[] iconImages
java.awt.Image geometryIcons
Method Detail |
public static JAttribsControlsFactory getJAttribsControlsFactory(FigBasicEditor editor)
public void setStatusMessage(StatusMessage _helper)
public JUpdateModeButton createUpdateModeButton(java.awt.Component parent)
public JStateButton createLineStyleButton(java.awt.Component parent)
public JColorButton createLineColorButton(java.awt.Component parent)
public JFillPatternButton createFillPatternButton(java.awt.Component parent)
public JStateButton createFillStyleButton(java.awt.Component parent)
public JStateButton createSmartLinksButton(java.awt.Component parent)
public JColorButton createFillColorButton(java.awt.Component parent)
public JStateButton createArrowStyleButton(java.awt.Component parent)
public JStateButton createArrowModeButton(java.awt.Component parent)
public javax.swing.JTextField createFrontArrowWidthField(java.awt.Component parent)
public javax.swing.JTextField createFrontArrowLengthField(java.awt.Component parent)
public javax.swing.JTextField createFrontArrowThicknessField(java.awt.Component parent)
public javax.swing.JTextField createBackArrowWidthField(java.awt.Component parent)
public javax.swing.JTextField createBackArrowLengthField(java.awt.Component parent)
public javax.swing.JTextField createBackArrowThicknessField(java.awt.Component parent)
public JStateButton createTextAlignButton(java.awt.Component parent)
public JFontButton createFontSelectButton(java.awt.Component parent)
public JNumericStateButton createFontSizeButton(java.awt.Component parent)
public javax.swing.JComboBox createFontFlagChoice(java.awt.Component parent)
public JStateButton createFontFlagButton(java.awt.Component parent)
public JStateButton createLineWidthButton(java.awt.Component parent)
public JStateButton createGeometryButton(java.awt.Component parent)
public JNumericStateButton createRoundRectButton(java.awt.Component parent)
public JNumericStateButton createDepthButton(java.awt.Component parent)
public javax.swing.JTextField createDashLengthField(java.awt.Component parent)
public JStateButton createSnapModeButton(java.awt.Component parent)
public JStateButton createObjectAlignXButton(java.awt.Component parent)
public JStateButton createObjectAlignYButton(java.awt.Component parent)
public JNumericStateButton createRotationButton(java.awt.Component parent)
public javax.swing.JComboBox createLandscapePortraitChoice(java.awt.Component parent)
public javax.swing.JComboBox createCenterFlushLeftChoice(java.awt.Component parent)
public JStateButton createUpdateMaskButton(java.awt.Component parent, java.lang.String callback, java.lang.String helpMessage)
public javax.swing.JPanel buildPanel(java.awt.Component parent)
public int getObjectAlignXMode()
public int getObjectAlignYMode()
public int getSmartLinksMode()
public int getGeometryMode()
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, JNumericStateButton depthButton)
public void setDashLength(FigAttribs attr, javax.swing.JTextField dashLengthField)
public void setLineWidth(FigAttribs attr, JStateButton lineWidthButton)
public void setLineStyle(FigAttribs attr, JStateButton lineStyleButton)
public void setCornerRadius(FigAttribs attr, JNumericStateButton roundRectButton)
public void setLineColor(FigAttribs attr, JColorButton lineColorButton)
public void setFillColor(FigAttribs attr, JColorButton fillColorButton)
public void setFillPattern(FigAttribs attr, JFillPatternButton FBP)
public void setFillStyleOld(FigAttribs attr, JStateButton fillStyleButton)
public void setArrowStyle(FigAttribs attr, JStateButton arrowStyleButton)
public void setFArrowWidth(FigAttribs attr, javax.swing.JTextField field)
public void setFArrowLength(FigAttribs attr, javax.swing.JTextField field)
public void setFArrowThickness(FigAttribs attr, javax.swing.JTextField field)
public void setBArrowWidth(FigAttribs attr, javax.swing.JTextField field)
public void setBArrowLength(FigAttribs attr, javax.swing.JTextField field)
public void setBArrowThickness(FigAttribs attr, javax.swing.JTextField field)
public void setArrowMode(FigAttribs attr, JStateButton arrowModeButton)
public void setTextAlignment(FigAttribs attr, JStateButton textAlignButton)
public void setFontSize(FigAttribs attr, JNumericStateButton fontSizeButton)
public void setFontFlags(FigAttribs attr, JStateButton fontFlagButton)
public void setFontFlags(FigAttribs attr, javax.swing.JComboBox fontFlagChoice)
public void selectFont(FigAttribs attr, JFontButton fontSelectButton)
public void setSnapMode(FigAttribs attr, JStateButton snapModeButton)
public void setLandscapeMode(FigAttribs attr, javax.swing.JComboBox landscapePortraitChoice)
public void setJustificationMode(FigAttribs attr, javax.swing.JComboBox centerFlushLeftChoice)
public void setRotationAngle(FigAttribs attr, JNumericStateButton rotationAngleButton)
public void showValues(FigAttribs attr)
public void showDepth(FigAttribs attr, JNumericStateButton depthButton)
public void showDashLength(FigAttribs attr, javax.swing.JTextField dashLengthField)
public void showLineWidth(FigAttribs attr, JStateButton lineWidthButton)
public void showLineStyle(FigAttribs attr, JStateButton lineStyleButton)
public void showLineColor(FigAttribs attr, JColorButton lineColorButton)
public void showFillPattern(FigAttribs attr, JFillPatternButton FPB)
public void showFillStyle(FigAttribs attr, JStateButton fillStyleButton)
public void showFillColor(FigAttribs attr, JColorButton fillColorButton)
public void showArrowMode(FigAttribs attr, JStateButton arrowModeButton)
public void showArrowStyle(FigAttribs attr, JStateButton arrowStyleButton)
public void showFArrowWidth(FigAttribs attr, javax.swing.JTextField field)
public void showFArrowLength(FigAttribs attr, javax.swing.JTextField field)
public void showBArrowWidth(FigAttribs attr, javax.swing.JTextField field)
public void showBArrowLength(FigAttribs attr, javax.swing.JTextField field)
public void showFArrowThickness(FigAttribs attr, javax.swing.JTextField field)
public void showBArrowThickness(FigAttribs attr, javax.swing.JTextField field)
public void showTextAlignment(FigAttribs attr, JStateButton textAlignButton)
public void showFontSize(FigAttribs attr, JNumericStateButton fontSizeButton)
public void showFontFlags(FigAttribs attr, javax.swing.JComboBox fontFlagChoice)
public void showFontFlags(FigAttribs attr, JStateButton fontFlagButton)
public void showCornerRadius(FigAttribs attr, JNumericStateButton roundRectButton)
public void showFontName(FigAttribs attr, JFontButton fontButton)
public void showLandscapeMode(FigAttribs attr, javax.swing.JComboBox landscapePortraitChoice)
public void showJustificationMode(FigAttribs attr, javax.swing.JComboBox centerFlushLeftChoice)
public void showRotationAngle(FigAttribs attr, JNumericStateButton 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, javax.swing.JTextArea coordsTextArea)
public void showCoords(java.awt.Point[] wcp, javax.swing.JTextField coordsTextField)
public void showCoords(java.awt.Point wcp, javax.swing.JTextField coordsTextField)
public void retrievePoints(FigObject object, javax.swing.JTextArea coordsTextArea)
public void retrievePoints(FigObject object, javax.swing.JTextField 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 |