Class TranslatablePanelTitledBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
com.inductiveautomation.factorypmi.application.components.border.TranslatableTitledBorder
com.inductiveautomation.factorypmi.application.components.border.TranslatablePanelTitledBorder
- All Implemented Interfaces:
LocaleListener
,Serializable
,Border
Filename: TranslatablePanelTitledBorder.java
Created on Sep 26, 2014
Author: Kathy Applebaum
Copyright Inductive Automation 2014
Project: Vision
Note: code mostly copied from PanelTitledBorder, but brought into Vision.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Fields inherited from class javax.swing.border.TitledBorder
ABOVE_BOTTOM, ABOVE_TOP, BELOW_BOTTOM, BELOW_TOP, border, BOTTOM, CENTER, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, EDGE_SPACING, LEADING, LEFT, RIGHT, TEXT_INSET_H, TEXT_SPACING, title, titleColor, titleFont, titleJustification, titlePosition, TOP, TRAILING
Fields inherited from interface com.inductiveautomation.ignition.client.model.LocaleListener
LOCAL_CHANGE_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionFor serialization onlyTranslatablePanelTitledBorder
(PanelTitledBorder panelTitledBorder) TranslatablePanelTitledBorder
(Color mainColor, Color background, String text) -
Method Summary
Modifier and TypeMethodDescriptiongetBorderInsets
(Component c, Insets insets) int
getHGap()
int
int
getStyle()
Returns the title-font of the titled border.int
getVGap()
boolean
void
localeChanged
(Locale newLocale) void
paintBorder
(Component c, Graphics graphics, int x, int y, int width, int height) void
setBackground
(Color background) void
setHGap
(int gap) void
setMainColor
(Color mainColor) void
setShadowSize
(int shadowSize) void
setStyle
(int style) void
void
setTitleColor
(Color titleColor) void
setTitleFont
(Font titleFont) void
setTitleJustification
(int titleJustification) void
setVGap
(int gap) toString()
Methods inherited from class com.inductiveautomation.factorypmi.application.components.border.TranslatableTitledBorder
getBorderText, getUntranslatedTitleText, isTitledBorder, setBorder, setUntranslatedTitleText, updateTitle
Methods inherited from class javax.swing.border.TitledBorder
getBaseline, getBaselineResizeBehavior, getBorder, getFont, getMinimumSize, getTitle, getTitleColor, getTitleJustification, getTitlePosition, setTitlePosition
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle
-
Field Details
-
STYLE_SN
public static final int STYLE_SN- See Also:
-
STYLE_WE
public static final int STYLE_WE- See Also:
-
STYLE_NS
public static final int STYLE_NS- See Also:
-
STYLE_EW
public static final int STYLE_EW- See Also:
-
STYLE_PLAIN
public static final int STYLE_PLAIN- See Also:
-
-
Constructor Details
-
TranslatablePanelTitledBorder
public TranslatablePanelTitledBorder()For serialization only -
TranslatablePanelTitledBorder
-
TranslatablePanelTitledBorder
-
-
Method Details
-
isBorderOpaque
public boolean isBorderOpaque()- Specified by:
isBorderOpaque
in interfaceBorder
- Overrides:
isBorderOpaque
in classTitledBorder
-
toString
-
localeChanged
- Specified by:
localeChanged
in interfaceLocaleListener
- Overrides:
localeChanged
in classTranslatableTitledBorder
-
setTitle
- Overrides:
setTitle
in classTranslatableTitledBorder
-
setTitleColor
- Overrides:
setTitleColor
in classTitledBorder
-
setTitleFont
- Overrides:
setTitleFont
in classTitledBorder
-
setTitleJustification
public void setTitleJustification(int titleJustification) - Overrides:
setTitleJustification
in classTitledBorder
-
getBorderInsets
- Specified by:
getBorderInsets
in interfaceBorder
- Overrides:
getBorderInsets
in classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsets
in classTitledBorder
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classTitledBorder
-
getTitleFont
Returns the title-font of the titled border. This is the implementation from Java 6. Java 7 doesn't check the UIManager when null.- Overrides:
getTitleFont
in classTitledBorder
-
getHGap
public int getHGap() -
setHGap
public void setHGap(int gap) -
getMainColor
-
setMainColor
-
getShadowSize
public int getShadowSize() -
setShadowSize
public void setShadowSize(int shadowSize) -
getVGap
public int getVGap() -
setVGap
public void setVGap(int gap) -
getStyle
public int getStyle() -
setStyle
public void setStyle(int style) -
getBackground
-
setBackground
-