jmri.jmrit.display
Class PositionablePopupUtil
java.lang.Object
jmri.jmrit.display.PositionablePopupUtil
public class PositionablePopupUtil
- extends Object
This class handles text attributes for Positionables.
Font size, style and color.
Margin size and color,
Border size and color,
Fixed sizes.
Justification.
- Author:
- Pete Cressman copyright (C) 2010
|
Method Summary |
protected void |
addColorMenuEntry(JMenu menu,
ButtonGroup colorButtonGroup,
String name,
Color color,
int colorType)
|
PositionablePopupUtil |
clone(Positionable parent)
|
void |
copyItem(JPopupMenu popup)
|
Color |
getBackground()
|
Color |
getBorderColor()
|
int |
getBorderSize()
|
int |
getFixedHeight()
|
int |
getFixedWidth()
|
Font |
getFont()
|
int |
getFontSize()
|
int |
getFontStyle()
|
Color |
getForeground()
|
int |
getJustification()
|
int |
getMargin()
|
String |
getText()
|
protected void |
makeColorMenu(JMenu colorMenu,
int type)
|
protected JMenu |
makeFontSizeMenu()
|
protected JMenu |
makeFontStyleMenu()
|
protected JMenuItem |
newStyleMenuItem(AbstractAction a,
int mask)
|
void |
propertyUtil(JPopupMenu popup)
|
void |
setBackgroundColor(Color color)
|
void |
setBackgroundMenu(JPopupMenu popup)
|
void |
setBorderColor(Color border)
|
void |
setBorderSize(int border)
|
protected void |
setColorButton(Color color,
Color buttonColor,
JRadioButtonMenuItem r)
|
void |
setFixedHeight(int h)
|
void |
setFixedSize(int w,
int h)
|
void |
setFixedTextMenu(JPopupMenu popup)
|
void |
setFixedWidth(int w)
|
void |
setFont(Font font)
|
void |
setFontSize(float newSize)
|
void |
setFontStyle(int style)
|
void |
setFontStyle(int addStyle,
int dropStyle)
|
void |
setForeground(Color c)
|
void |
setHorizontalAlignment(int alignment)
|
void |
setJustification(int just)
|
void |
setJustification(String just)
|
void |
setMargin(int m)
|
void |
setTextBorderMenu(JPopupMenu popup)
|
void |
setTextFontMenu(JPopupMenu popup)
|
void |
setTextJustificationMenu(JPopupMenu popup)
Justification |
void |
setTextMarginMenu(JPopupMenu popup)
|
String |
toString()
|
_textComponent
protected JComponent _textComponent
_textType
protected int _textType
_parent
protected Positionable _parent
_propertiesUtil
protected PositionablePropertiesUtil _propertiesUtil
LABEL
protected final int LABEL
- See Also:
- Constant Field Values
TEXTFIELD
protected final int TEXTFIELD
- See Also:
- Constant Field Values
FONT_COLOR
public static final int FONT_COLOR
- See Also:
- Constant Field Values
BACKGROUND_COLOR
public static final int BACKGROUND_COLOR
- See Also:
- Constant Field Values
BORDER_COLOR
public static final int BORDER_COLOR
- See Also:
- Constant Field Values
MIN_SIZE
public static final int MIN_SIZE
- See Also:
- Constant Field Values
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
CENTRE
public static final int CENTRE
- See Also:
- Constant Field Values
PositionablePopupUtil
public PositionablePopupUtil(Positionable parent,
JComponent textComp)
clone
public PositionablePopupUtil clone(Positionable parent)
toString
public String toString()
- Overrides:
toString in class Object
propertyUtil
public void propertyUtil(JPopupMenu popup)
setFixedTextMenu
public void setFixedTextMenu(JPopupMenu popup)
setTextMarginMenu
public void setTextMarginMenu(JPopupMenu popup)
setBackgroundMenu
public void setBackgroundMenu(JPopupMenu popup)
setTextBorderMenu
public void setTextBorderMenu(JPopupMenu popup)
setTextFontMenu
public void setTextFontMenu(JPopupMenu popup)
getMargin
public int getMargin()
setMargin
public void setMargin(int m)
getFixedWidth
public int getFixedWidth()
setFixedWidth
public void setFixedWidth(int w)
getFixedHeight
public int getFixedHeight()
setFixedHeight
public void setFixedHeight(int h)
setFixedSize
public void setFixedSize(int w,
int h)
setBorderSize
public void setBorderSize(int border)
getBorderSize
public int getBorderSize()
setBorderColor
public void setBorderColor(Color border)
getBorderColor
public Color getBorderColor()
setForeground
public void setForeground(Color c)
getForeground
public Color getForeground()
setBackgroundColor
public void setBackgroundColor(Color color)
getBackground
public Color getBackground()
makeFontSizeMenu
protected JMenu makeFontSizeMenu()
setFont
public void setFont(Font font)
getFont
public Font getFont()
setFontSize
public void setFontSize(float newSize)
getFontSize
public int getFontSize()
makeFontStyleMenu
protected JMenu makeFontStyleMenu()
setFontStyle
public void setFontStyle(int style)
setFontStyle
public void setFontStyle(int addStyle,
int dropStyle)
getFontStyle
public int getFontStyle()
newStyleMenuItem
protected JMenuItem newStyleMenuItem(AbstractAction a,
int mask)
makeColorMenu
protected void makeColorMenu(JMenu colorMenu,
int type)
addColorMenuEntry
protected void addColorMenuEntry(JMenu menu,
ButtonGroup colorButtonGroup,
String name,
Color color,
int colorType)
setColorButton
protected void setColorButton(Color color,
Color buttonColor,
JRadioButtonMenuItem r)
copyItem
public void copyItem(JPopupMenu popup)
setTextJustificationMenu
public void setTextJustificationMenu(JPopupMenu popup)
- Justification
setJustification
public void setJustification(int just)
setJustification
public void setJustification(String just)
getJustification
public int getJustification()
setHorizontalAlignment
public void setHorizontalAlignment(int alignment)
getText
public String getText()
Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: