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 intstatic final intstatic final intstatic final intstatic final intFields 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, TRAILINGFields 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) intgetHGap()intintgetStyle()Returns the title-font of the titled border.intgetVGap()booleanvoidlocaleChanged(Locale newLocale) voidpaintBorder(Component c, Graphics graphics, int x, int y, int width, int height) voidsetBackground(Color background) voidsetHGap(int gap) voidsetMainColor(Color mainColor) voidsetShadowSize(int shadowSize) voidsetStyle(int style) voidvoidsetTitleColor(Color titleColor) voidsetTitleFont(Font titleFont) voidsetTitleJustification(int titleJustification) voidsetVGap(int gap) toString()Methods inherited from class com.inductiveautomation.factorypmi.application.components.border.TranslatableTitledBorder
getBorderText, getUntranslatedTitleText, isTitledBorder, setBorder, setUntranslatedTitleText, updateTitleMethods inherited from class javax.swing.border.TitledBorder
getBaseline, getBaselineResizeBehavior, getBorder, getFont, getMinimumSize, getTitle, getTitleColor, getTitleJustification, getTitlePosition, setTitlePositionMethods 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:
isBorderOpaquein interfaceBorder- Overrides:
isBorderOpaquein classTitledBorder
-
toString
-
localeChanged
- Specified by:
localeChangedin interfaceLocaleListener- Overrides:
localeChangedin classTranslatableTitledBorder
-
setTitle
- Overrides:
setTitlein classTranslatableTitledBorder
-
setTitleColor
- Overrides:
setTitleColorin classTitledBorder
-
setTitleFont
- Overrides:
setTitleFontin classTitledBorder
-
setTitleJustification
public void setTitleJustification(int titleJustification) - Overrides:
setTitleJustificationin classTitledBorder
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder- Overrides:
getBorderInsetsin classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsetsin classTitledBorder
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin 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:
getTitleFontin 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
-