- java.lang.Object
-
- net.miginfocom.layout.PlatformDefaults
-
public final class PlatformDefaults extends java.lang.ObjectCurrently handles Windows, Mac OS X, and GNOME spacing.
-
-
Field Summary
Fields Modifier and Type Field Description private static intBASE_DPIprivate static java.lang.IntegerBASE_DPI_FORCEDstatic intBASE_FONT_SIZEI value indicating that the size of the font for the container of the component will be used as a base for calculating the logical pixel size.static intBASE_REAL_PIXELI value indicating that the size of a logical pixel should always be a real pixel and thus no compensation will be made.static intBASE_SCALE_FACTORI value indicating that the screen DPI will be used as a base for calculating the logical pixel size.private static UnitValueBUTT_PADDINGprivate static UnitValueBUTT_WIDTHprivate static java.lang.StringBUTTON_FORMATprivate static intCUR_PLAFprivate static intDEF_H_UNITprivate static BoundSizeDEF_HGAPprivate static intDEF_V_UNITprivate static BoundSizeDEF_VGAPprivate static UnitValue[]DIALOG_INSprivate static booleandraprivate static InCellGapProviderGAP_PROVIDERstatic intGNOMEprivate static java.util.HashMap<java.lang.String,UnitValue>HOR_DEFSprivate static java.lang.FloathorScaleprivate static intLP_BASEprivate static UnitValueLPX11private static UnitValueLPX12private static UnitValueLPX16private static UnitValueLPX18private static UnitValueLPX20private static UnitValueLPX6private static UnitValueLPX7private static UnitValueLPY11private static UnitValueLPY12private static UnitValueLPY16private static UnitValueLPY18private static UnitValueLPY20private static UnitValueLPY6private static UnitValueLPY7static intMAC_OSXprivate static intMOD_COUNTprivate static UnitValue[]PANEL_INS(package private) static BoundSizeRELATED_X(package private) static BoundSizeRELATED_Y(package private) static BoundSizeUNRELATED_X(package private) static BoundSizeUNRELATED_Yprivate static java.util.HashMap<java.lang.String,UnitValue>VER_DEFSprivate static java.lang.FloatverScaleprivate static java.util.HashMap<java.lang.String,int[]>VISUAL_BOUNDSstatic java.lang.StringVISUAL_PADDING_PROPERTYProperty to use in LAF settings and as JComponent client property to specify the visual padding.static intWINDOWS_XP
-
Constructor Summary
Constructors Modifier Constructor Description privatePlatformDefaults()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static intconvertToPixels(float value, java.lang.String unit, boolean isHor, float ref, ContainerWrapper parent, ComponentWrapper comp)Understands ("r", "rel", "related") OR ("u", "unrel", "unrelated") OR ("i", "ind", "indent") OR ("p", "para", "paragraph").static java.lang.StringgetButtonOrder()Returns the order for the typical buttons in a standard button bar.static intgetCurrentPlatform()Returns the platform that the JRE is running on currently.(package private) static BoundSizegetDefaultComponentGap(ComponentWrapper comp, ComponentWrapper adjacentComp, int adjacentSide, java.lang.String tag, boolean isLTR)Returns the default gap between two components that are in the same cell.static intgetDefaultDPI()static intgetDefaultHorizontalUnit()Returns the current default unit.static booleangetDefaultRowAlignmentBaseline()The default alignment for rows.static intgetDefaultVerticalUnit()Returns the current default unit.static int[]getDefaultVisualPadding(java.lang.String key)Returns the visual bounds for a component type.static UnitValuegetDialogInsets(int side)Returns the default dialog insets depending of the current platform.static InCellGapProvidergetGapProvider()Returns the current gap provider ornullif none is set and "related" should always be used.static BoundSizegetGridGapX()Returns the platform recommended inter-cell gap in the horizontal (x) dimension..static BoundSizegetGridGapY()Returns the platform recommended inter-cell gap in the vertical (x) dimension..static java.lang.FloatgetHorizontalScaleFactor()The forced scale factor that all screen relative units (e.g.static floatgetLabelAlignPercentage()Returns the percentage used for alignment for labels (0 is left, 50 is center and 100 is right).static intgetLogicalPixelBase()What base value should be used to calculate logical pixel sizes.static UnitValuegetMinimumButtonPadding()static UnitValuegetMinimumButtonWidth()Returns the recommended minimum button width depending on the current set platform.static floatgetMinimumButtonWidthIncludingPadding(float refValue, ContainerWrapper parent, ComponentWrapper comp)static intgetModCount()Returns how many times the defaults has been changed.static UnitValuegetPanelInsets(int side)Returns the default panel insets depending of the current platform.static intgetPlatform()Returns the current platformstatic intgetPlatformDPI(int plaf)(package private) static java.lang.StringgetTagForChar(char c)Returns the tag (used in theCC) for a char.static UnitValuegetUnitValueX(java.lang.String unit)Returns the unit value associated with the unit.static UnitValuegetUnitValueY(java.lang.String unit)Returns the unit value associated with the unit.static java.lang.FloatgetVerticalScaleFactor()The forced scale factor that all screen relative units (e.g.voidinvalidate()Tells all layout manager instances to revalidate and recalculated everything.static voidsetButtonOrder(java.lang.String order)Sets the order for the typical buttons in a standard button bar.static voidsetDefaultDPI(java.lang.Integer dpi)Sets the default platform DPI.static voidsetDefaultHorizontalUnit(int unit)Sets the default unit.static voidsetDefaultRowAlignmentBaseline(boolean b)The default alignment for rows.static voidsetDefaultVerticalUnit(int unit)Sets the default unit.static voidsetDefaultVisualPadding(java.lang.String key, int[] insets)Sets the visual bounds for a component type.static voidsetDialogInsets(UnitValue top, UnitValue left, UnitValue bottom, UnitValue right)Sets the default insets for a dialog.static voidsetGapProvider(InCellGapProvider provider)Sets the current gap provider ornullif none is set and "related" should always be used.static voidsetGridCellGap(UnitValue x, UnitValue y)Sets gap between two cells in the grid.static voidsetHorizontalScaleFactor(java.lang.Float f)The forced scale factor that all screen relative units (e.g.static voidsetIndentGap(UnitValue x, UnitValue y)Sets gap value for components that are "intended".static voidsetLogicalPixelBase(int base)What base value should be used to calculate logical pixel sizes.static voidsetMinimumButtonPadding(UnitValue padding)static voidsetMinimumButtonWidth(UnitValue width)Sets the recommended minimum button width.static voidsetPanelInsets(UnitValue top, UnitValue left, UnitValue bottom, UnitValue right)Sets the default insets for a dialog.static voidsetParagraphGap(UnitValue x, UnitValue y)Sets paragraph gap value for components.static voidsetPlatform(int plaf)Set the defaults to the default for the platformstatic voidsetRelatedGap(UnitValue x, UnitValue y)Sets gap value for components that are "related".static voidsetUnitValue(java.lang.String[] unitStrings, UnitValue x, UnitValue y)Sets the unit value associated with a unit string.static voidsetUnrelatedGap(UnitValue x, UnitValue y)Sets gap value for components that are "unrelated".static voidsetVerticalScaleFactor(java.lang.Float f)The forced scale factor that all screen relative units (e.g.
-
-
-
Field Detail
-
VISUAL_PADDING_PROPERTY
public static java.lang.String VISUAL_PADDING_PROPERTY
Property to use in LAF settings and as JComponent client property to specify the visual padding.
-
DEF_H_UNIT
private static int DEF_H_UNIT
-
DEF_V_UNIT
private static int DEF_V_UNIT
-
GAP_PROVIDER
private static InCellGapProvider GAP_PROVIDER
-
MOD_COUNT
private static volatile int MOD_COUNT
-
LPX6
private static final UnitValue LPX6
-
LPX7
private static final UnitValue LPX7
-
LPX11
private static final UnitValue LPX11
-
LPX12
private static final UnitValue LPX12
-
LPX16
private static final UnitValue LPX16
-
LPX18
private static final UnitValue LPX18
-
LPX20
private static final UnitValue LPX20
-
LPY6
private static final UnitValue LPY6
-
LPY7
private static final UnitValue LPY7
-
LPY11
private static final UnitValue LPY11
-
LPY12
private static final UnitValue LPY12
-
LPY16
private static final UnitValue LPY16
-
LPY18
private static final UnitValue LPY18
-
LPY20
private static final UnitValue LPY20
-
WINDOWS_XP
public static final int WINDOWS_XP
- See Also:
- Constant Field Values
-
MAC_OSX
public static final int MAC_OSX
- See Also:
- Constant Field Values
-
GNOME
public static final int GNOME
- See Also:
- Constant Field Values
-
CUR_PLAF
private static int CUR_PLAF
-
PANEL_INS
private static final UnitValue[] PANEL_INS
-
DIALOG_INS
private static final UnitValue[] DIALOG_INS
-
BUTTON_FORMAT
private static java.lang.String BUTTON_FORMAT
-
HOR_DEFS
private static final java.util.HashMap<java.lang.String,UnitValue> HOR_DEFS
-
VER_DEFS
private static final java.util.HashMap<java.lang.String,UnitValue> VER_DEFS
-
DEF_VGAP
private static BoundSize DEF_VGAP
-
DEF_HGAP
private static BoundSize DEF_HGAP
-
RELATED_X
static BoundSize RELATED_X
-
RELATED_Y
static BoundSize RELATED_Y
-
UNRELATED_X
static BoundSize UNRELATED_X
-
UNRELATED_Y
static BoundSize UNRELATED_Y
-
BUTT_WIDTH
private static UnitValue BUTT_WIDTH
-
BUTT_PADDING
private static UnitValue BUTT_PADDING
-
horScale
private static java.lang.Float horScale
-
verScale
private static java.lang.Float verScale
-
BASE_FONT_SIZE
public static final int BASE_FONT_SIZE
I value indicating that the size of the font for the container of the component will be used as a base for calculating the logical pixel size. This is much as how Windows calculated DLU (dialog units).
-
BASE_SCALE_FACTOR
public static final int BASE_SCALE_FACTOR
I value indicating that the screen DPI will be used as a base for calculating the logical pixel size.This is the default value.
-
BASE_REAL_PIXEL
public static final int BASE_REAL_PIXEL
I value indicating that the size of a logical pixel should always be a real pixel and thus no compensation will be made.
-
LP_BASE
private static int LP_BASE
-
BASE_DPI_FORCED
private static java.lang.Integer BASE_DPI_FORCED
-
BASE_DPI
private static int BASE_DPI
-
dra
private static boolean dra
-
VISUAL_BOUNDS
private static final java.util.HashMap<java.lang.String,int[]> VISUAL_BOUNDS
-
-
Method Detail
-
getCurrentPlatform
public static int getCurrentPlatform()
Returns the platform that the JRE is running on currently.- Returns:
- The platform that the JRE is running on currently. E.g.
MAC_OSX,WINDOWS_XP, orGNOME.
-
setPlatform
public static void setPlatform(int plaf)
Set the defaults to the default for the platform- Parameters:
plaf- The platform.PlatformDefaults.WINDOWS_XP,PlatformDefaults.MAC_OSX, orPlatformDefaults.GNOME.
-
setDefaultVisualPadding
public static void setDefaultVisualPadding(java.lang.String key, int[] insets)Sets the visual bounds for a component type.- Parameters:
key- The component type. E.g. "TabbedPane.visualPadding" or "ComboBox.editable.isSquare.visualPadding". See source code for list.insets- Top, left, bottom, right. Always length 4 or null.- See Also:
ComponentWrapper.getVisualPadding()
-
getDefaultVisualPadding
public static int[] getDefaultVisualPadding(java.lang.String key)
Returns the visual bounds for a component type.- Parameters:
key- The component type. E.g. "TabbedPane.visualPadding" or "ComboBox.editable.isSquare.visualPadding". See source code for list.- Returns:
- insets Top, left, bottom, right. Always length 4 or null. Live object, MUST NOT BE CHANGED!.
- See Also:
ComponentWrapper.getVisualPadding()
-
getPlatformDPI
public static int getPlatformDPI(int plaf)
-
getPlatform
public static int getPlatform()
Returns the current platform- Returns:
PlatformDefaults.WINDOWSorPlatformDefaults.MAC_OSX
-
getDefaultDPI
public static int getDefaultDPI()
-
setDefaultDPI
public static void setDefaultDPI(java.lang.Integer dpi)
Sets the default platform DPI. Normally this is set in thesetPlatform(int)for the different platforms but it can be tweaked here. For instance SWT on Mac does this.Note that this is not the actual current DPI, but the base DPI for the toolkit.
- Parameters:
dpi- The base DPI. If null the default DPI is reset to the platform base DPI.
-
getHorizontalScaleFactor
public static java.lang.Float getHorizontalScaleFactor()
The forced scale factor that all screen relative units (e.g. millimeters, inches and logical pixels) will be multiplied with. Ifnullthis will default to a scale that will scale the current screen to the default screen resolution (72 DPI for Mac and 92 DPI for Windows).- Returns:
- The forced scale or
nullfor default scaling. - See Also:
getHorizontalScaleFactor(),ComponentWrapper.getHorizontalScreenDPI()
-
setHorizontalScaleFactor
public static void setHorizontalScaleFactor(java.lang.Float f)
The forced scale factor that all screen relative units (e.g. millimeters, inches and logical pixels) will be multiplied with. Ifnullthis will default to a scale that will scale the current screen to the default screen resolution (72 DPI for Mac and 92 DPI for Windows).- Parameters:
f- The forced scale ornullfor default scaling.- See Also:
getHorizontalScaleFactor(),ComponentWrapper.getHorizontalScreenDPI()
-
getVerticalScaleFactor
public static java.lang.Float getVerticalScaleFactor()
The forced scale factor that all screen relative units (e.g. millimeters, inches and logical pixels) will be multiplied with. Ifnullthis will default to a scale that will scale the current screen to the default screen resolution (72 DPI for Mac and 92 DPI for Windows).- Returns:
- The forced scale or
nullfor default scaling. - See Also:
getHorizontalScaleFactor(),ComponentWrapper.getVerticalScreenDPI()
-
setVerticalScaleFactor
public static void setVerticalScaleFactor(java.lang.Float f)
The forced scale factor that all screen relative units (e.g. millimeters, inches and logical pixels) will be multiplied with. Ifnullthis will default to a scale that will scale the current screen to the default screen resolution (72 DPI for Mac and 92 DPI for Windows).- Parameters:
f- The forced scale ornullfor default scaling.- See Also:
getHorizontalScaleFactor(),ComponentWrapper.getVerticalScreenDPI()
-
getLogicalPixelBase
public static int getLogicalPixelBase()
What base value should be used to calculate logical pixel sizes.- Returns:
- The current base. Default is
BASE_SCALE_FACTOR - See Also:
BASE_FONT_SIZE,BASE_SCALE_FACTOR,BASE_REAL_PIXEL
-
setLogicalPixelBase
public static void setLogicalPixelBase(int base)
What base value should be used to calculate logical pixel sizes.- Parameters:
base- The new base. Default isBASE_SCALE_FACTOR- See Also:
BASE_FONT_SIZE,BASE_SCALE_FACTOR,BASE_REAL_PIXEL
-
setRelatedGap
public static void setRelatedGap(UnitValue x, UnitValue y)
Sets gap value for components that are "related".- Parameters:
x- The value that will be transformed to pixels. Ifnullthe current value will not change.y- The value that will be transformed to pixels. Ifnullthe current value will not change.
-
setUnrelatedGap
public static void setUnrelatedGap(UnitValue x, UnitValue y)
Sets gap value for components that are "unrelated".- Parameters:
x- The value that will be transformed to pixels. Ifnullthe current value will not change.y- The value that will be transformed to pixels. Ifnullthe current value will not change.
-
setParagraphGap
public static void setParagraphGap(UnitValue x, UnitValue y)
Sets paragraph gap value for components.- Parameters:
x- The value that will be transformed to pixels. Ifnullthe current value will not change.y- The value that will be transformed to pixels. Ifnullthe current value will not change.
-
setIndentGap
public static void setIndentGap(UnitValue x, UnitValue y)
Sets gap value for components that are "intended".- Parameters:
x- The value that will be transformed to pixels. Ifnullthe current value will not change.y- The value that will be transformed to pixels. Ifnullthe current value will not change.
-
setGridCellGap
public static void setGridCellGap(UnitValue x, UnitValue y)
Sets gap between two cells in the grid. Note that this is not a gap between component IN a cell, that has to be set on the component constraints. The value will be the min and preferred size of the gap.- Parameters:
x- The value that will be transformed to pixels. Ifnullthe current value will not change.y- The value that will be transformed to pixels. Ifnullthe current value will not change.
-
setMinimumButtonWidth
public static void setMinimumButtonWidth(UnitValue width)
Sets the recommended minimum button width.- Parameters:
width- The recommended minimum button width.
-
getMinimumButtonWidth
public static UnitValue getMinimumButtonWidth()
Returns the recommended minimum button width depending on the current set platform.- Returns:
- The recommended minimum button width depending on the current set platform.
-
setMinimumButtonPadding
public static void setMinimumButtonPadding(UnitValue padding)
-
getMinimumButtonPadding
public static UnitValue getMinimumButtonPadding()
-
getMinimumButtonWidthIncludingPadding
public static float getMinimumButtonWidthIncludingPadding(float refValue, ContainerWrapper parent, ComponentWrapper comp)
-
getUnitValueX
public static UnitValue getUnitValueX(java.lang.String unit)
Returns the unit value associated with the unit. (E.i. "related" or "indent"). Must be lower case.- Parameters:
unit- The unit string.- Returns:
- The unit value associated with the unit.
nullfor unrecognized units.
-
getUnitValueY
public static UnitValue getUnitValueY(java.lang.String unit)
Returns the unit value associated with the unit. (E.i. "related" or "indent"). Must be lower case.- Parameters:
unit- The unit string.- Returns:
- The unit value associated with the unit.
nullfor unrecognized units.
-
setUnitValue
public static void setUnitValue(java.lang.String[] unitStrings, UnitValue x, UnitValue y)Sets the unit value associated with a unit string. This may be used to store values for new unit strings or modify old. Note that if a built in unit (such as "related") is modified all versions of it must be set (I.e. "r", "rel" and "related"). The build in values will be reset to the default ones if the platform is re-set.- Parameters:
unitStrings- The unit strings. E.g. "mu", "myunit". Will be converted to lower case and trimmed. Notnull.x- The value for the horizontal dimension. Ifnullthe value is not changed.y- The value for the vertical dimension. Might be same object as forx. Ifnullthe value is not changed.
-
convertToPixels
static int convertToPixels(float value, java.lang.String unit, boolean isHor, float ref, ContainerWrapper parent, ComponentWrapper comp)Understands ("r", "rel", "related") OR ("u", "unrel", "unrelated") OR ("i", "ind", "indent") OR ("p", "para", "paragraph").
-
getButtonOrder
public static java.lang.String getButtonOrder()
Returns the order for the typical buttons in a standard button bar. It is one letter per button type.- Returns:
- The button order.
- See Also:
setButtonOrder(String)
-
setButtonOrder
public static void setButtonOrder(java.lang.String order)
Sets the order for the typical buttons in a standard button bar. It is one letter per button type.Letter in upper case will get the minimum button width that the
getMinimumButtonWidth()specifies and letters in lower case will get the width the current look&feel specifies.Gaps will never be added to before the first component or after the last component. However, '+' (push) will be applied before and after as well, but with a minimum size of 0 if first/last so there will not be a gap before or after.
If gaps are explicitly set on buttons they will never be reduced, but they may be increased.
These are the characters that can be used:
'L'- Buttons with this style tag will statically end up on the left end of the bar.'R'- Buttons with this style tag will statically end up on the right end of the bar.'H'- A tag for the "help" button that normally is supposed to be on the right.'E'- A tag for the "help2" button that normally is supposed to be on the left.'Y'- A tag for the "yes" button.'N'- A tag for the "no" button.'X'- A tag for the "next >" or "forward >" button.'B'- A tag for the "< back" or "< previous" button.'I'- A tag for the "finish" button.'A'- A tag for the "apply" button.'C'- A tag for the "cancel" or "close" button.'O'- A tag for the "ok" or "done" button.'U'- All Uncategorized, Other, or "Unknown" buttons. Tag will be "other".'+'- A glue push gap that will take as much space as it can and at least an "unrelated" gap. (Platform dependent)'_'- (underscore) An "unrelated" gap. (Platform dependent)
Even though the style tags are normally applied to buttons this works with all components.
The normal style for MAC OS X is
"L_HE+U+NYBXCOA_I_R", for Windows is"L_E+U+YNBXOCAH_I_R", and for GNOME is"L_HE+UNYACBXO_I_R".- Parameters:
order- The new button order for the current platform.
-
getTagForChar
static java.lang.String getTagForChar(char c)
Returns the tag (used in theCC) for a char. The char is same as used ingetButtonOrder().- Parameters:
c- The char. Must be lower case!- Returns:
- The tag that corresponds to the char or
nullif the char is unrecognized.
-
getGridGapX
public static BoundSize getGridGapX()
Returns the platform recommended inter-cell gap in the horizontal (x) dimension..- Returns:
- The platform recommended inter-cell gap in the horizontal (x) dimension..
-
getGridGapY
public static BoundSize getGridGapY()
Returns the platform recommended inter-cell gap in the vertical (x) dimension..- Returns:
- The platform recommended inter-cell gap in the vertical (x) dimension..
-
getDialogInsets
public static UnitValue getDialogInsets(int side)
Returns the default dialog insets depending of the current platform.- Parameters:
side- top == 0, left == 1, bottom = 2, right = 3.- Returns:
- The insets. Never
null.
-
setDialogInsets
public static void setDialogInsets(UnitValue top, UnitValue left, UnitValue bottom, UnitValue right)
Sets the default insets for a dialog. Values that are null will not be changed.- Parameters:
top- The top inset. May benull.left- The left inset. May benull.bottom- The bottom inset. May benull.right- The right inset. May benull.
-
getPanelInsets
public static UnitValue getPanelInsets(int side)
Returns the default panel insets depending of the current platform.- Parameters:
side- top == 0, left == 1, bottom = 2, right = 3.- Returns:
- The insets. Never
null.
-
setPanelInsets
public static void setPanelInsets(UnitValue top, UnitValue left, UnitValue bottom, UnitValue right)
Sets the default insets for a dialog. Values that are null will not be changed.- Parameters:
top- The top inset. May benull.left- The left inset. May benull.bottom- The bottom inset. May benull.right- The right inset. May benull.
-
getLabelAlignPercentage
public static float getLabelAlignPercentage()
Returns the percentage used for alignment for labels (0 is left, 50 is center and 100 is right).- Returns:
- The percentage used for alignment for labels
-
getDefaultComponentGap
static BoundSize getDefaultComponentGap(ComponentWrapper comp, ComponentWrapper adjacentComp, int adjacentSide, java.lang.String tag, boolean isLTR)
Returns the default gap between two components that are in the same cell.- Parameters:
comp- The component that the gap is for. Nevernull.adjacentComp- The adjacent component if any. May benull.adjacentSide- What side theadjacentCompis on.SwingConstants.TOP(1) orSwingConstants.LEFT(2) orSwingConstants.BOTTOM(3) orSwingConstants.RIGHT(4).tag- The tag string that the component might be tagged with in the component constraints. May benull.isLTR- If it is left-to-right.- Returns:
- The default gap between two components or
nullif there should be no gap.
-
getGapProvider
public static InCellGapProvider getGapProvider()
Returns the current gap provider ornullif none is set and "related" should always be used.- Returns:
- The current gap provider or
nullif none is set and "related" should always be used.
-
setGapProvider
public static void setGapProvider(InCellGapProvider provider)
Sets the current gap provider ornullif none is set and "related" should always be used.- Parameters:
provider- The current gap provider ornullif none is set and "related" should always be used.
-
getModCount
public static int getModCount()
Returns how many times the defaults has been changed. This can be used as a light weight check to see if layout caches needs to be refreshed.- Returns:
- How many times the defaults has been changed.
-
invalidate
public void invalidate()
Tells all layout manager instances to revalidate and recalculated everything.
-
getDefaultHorizontalUnit
public static int getDefaultHorizontalUnit()
Returns the current default unit. The default unit is the unit used if no unit is set. E.g. "width 10".- Returns:
- The current default unit.
- See Also:
UnitValue.PIXEL,UnitValue.LPX
-
setDefaultHorizontalUnit
public static void setDefaultHorizontalUnit(int unit)
Sets the default unit. The default unit is the unit used if no unit is set. E.g. "width 10".- Parameters:
unit- The new default unit.- See Also:
UnitValue.PIXEL,UnitValue.LPX
-
getDefaultVerticalUnit
public static int getDefaultVerticalUnit()
Returns the current default unit. The default unit is the unit used if no unit is set. E.g. "width 10".- Returns:
- The current default unit.
- See Also:
UnitValue.PIXEL,UnitValue.LPY
-
setDefaultVerticalUnit
public static void setDefaultVerticalUnit(int unit)
Sets the default unit. The default unit is the unit used if no unit is set. E.g. "width 10".- Parameters:
unit- The new default unit.- See Also:
UnitValue.PIXEL,UnitValue.LPY
-
getDefaultRowAlignmentBaseline
public static boolean getDefaultRowAlignmentBaseline()
The default alignment for rows. Pre v3.5 this wasfalsebut now it istrue.- Returns:
- The current value. Default is
true. - Since:
- 3.5
-
setDefaultRowAlignmentBaseline
public static void setDefaultRowAlignmentBaseline(boolean b)
The default alignment for rows. Pre v3.5 this wasfalsebut now it istrue.- Parameters:
b- The new value. Default istruefrom v3.5.- Since:
- 3.5
-
-