📄 titledtabstateproperties.java
字号:
}
/**
* Gets the icon
*
* @return icon or null if no icon
*/
public Icon getIcon() {
return ICON.get(getMap());
}
/**
* Sets the text
*
* @param text text or null for no text
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setText(String text) {
TEXT.set(getMap(), text);
return this;
}
/**
* Gets the text
*
* @return text or null if no text
*/
public String getText() {
return TEXT.get(getMap());
}
/**
* Sets the gap in pixels between the icon and the text
*
* @param gap number of pixels
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setIconTextGap(int gap) {
ICON_TEXT_GAP.set(getMap(), gap);
return this;
}
/**
* Gets the gap in pixels between the icon and the text
*
* @return number of pixels
*/
public int getIconTextGap() {
return ICON_TEXT_GAP.get(getMap());
}
/**
* Sets the tool tip text
*
* @param text tool tip text
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setToolTipText(String text) {
TOOL_TIP_TEXT.set(getMap(), text);
return this;
}
/**
* Gets the tool tip text
*
* @return tool tip text
*/
public String getToolTipText() {
return TOOL_TIP_TEXT.get(getMap());
}
/**
* Sets if tool tip text is enabled or disabled
*
* @param enabled true for enabled, otherwise false
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setToolTipEnabled(boolean enabled) {
TOOL_TIP_ENABLED.set(getMap(), enabled);
return this;
}
/**
* Gets if tool tip text is enabled or disabled
*
* @return true if enabled, otherwise false
*/
public boolean getToolTipEnabled() {
return TOOL_TIP_ENABLED.get(getMap());
}
/**
* Sets if icon is visible or not visible
*
* @param visible true for visible, otherwise false
* @return this TitledTabStateProperties
* @since ITP 1.1.0
*/
public TitledTabStateProperties setIconVisible(boolean visible) {
ICON_VISIBLE.set(getMap(), visible);
return this;
}
/**
* Gets if icon is visible or not visible
*
* @return true if visible, otherwise false
* @since ITP 1.1.0
*/
public boolean getIconVisible() {
return ICON_VISIBLE.get(getMap());
}
/**
* Sets if text is visible or not visible
*
* @param visible true for visible, otherwise false
* @return this TitledTabStateProperties
* @since ITP 1.1.0
*/
public TitledTabStateProperties setTextVisible(boolean visible) {
TEXT_VISIBLE.set(getMap(), visible);
return this;
}
/**
* Gets if text is visible or not visible
*
* @return true if visible, otherwise false
* @since ITP 1.1.0
*/
public boolean getTextVisible() {
return TEXT_VISIBLE.get(getMap());
}
/**
* Sets if title component is visible or not visible
*
* @param visible true for enabled, otherwise false
* @return this TitledTabStateProperties
* @since ITP 1.1.0
*/
public TitledTabStateProperties setTitleComponentVisible(boolean visible) {
TITLE_COMPONENT_VISIBLE.set(getMap(), visible);
return this;
}
/**
* Gets if title component is visible or not visible
*
* @return true if enabled, otherwise false
* @since ITP 1.1.0
*/
public boolean getTitleComponentVisible() {
return TITLE_COMPONENT_VISIBLE.get(getMap());
}
/**
* Sets the text's and icon's horizontal alignment
*
* @param alignment text and icon alignment
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setHorizontalAlignment(Alignment alignment) {
HORIZONTAL_ALIGNMENT.set(getMap(), alignment);
return this;
}
/**
* Gets the text's and icon's horizontal alignment
*
* @return text and icon alignment
*/
public Alignment getHorizontalAlignment() {
return HORIZONTAL_ALIGNMENT.get(getMap());
}
/**
* Sets the text's and icon's vertical alignment
*
* @param alignment text and icon horizontal alignment
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setVerticalAlignment(Alignment alignment) {
VERTICAL_ALIGNMENT.set(getMap(), alignment);
return this;
}
/**
* Gets the text's and icon's vertical alignment
*
* @return text and icon vertical alignment
*/
public Alignment getVerticalAlignment() {
return VERTICAL_ALIGNMENT.get(getMap());
}
/**
* Sets the icon alignment relative to the text. Makes it possible to switch
* places between text and icon.
*
* @param alignment icon alignment relative to text
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setIconTextRelativeAlignment(Alignment alignment) {
ICON_TEXT_RELATIVE_ALIGNMENT.set(getMap(), alignment);
return this;
}
/**
* Gets the icon alignment relative to the text.
*
* @return icon alignment relative to text
*/
public Alignment getIconTextRelativeAlignment() {
return ICON_TEXT_RELATIVE_ALIGNMENT.get(getMap());
}
/**
* Sets the gap in pixels between the text/icon and the title component
*
* @param gap number of pixels
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setTextTitleComponentGap(int gap) {
TEXT_TITLE_COMPONENT_GAP.set(getMap(), gap);
return this;
}
/**
* Gets the gap in pixels between the text/icon and the title component
*
* @return number of pixels
*/
public int getTextTitleComponentGap() {
return TEXT_TITLE_COMPONENT_GAP.get(getMap());
}
/**
* Sets the title components alignment relative to the text/icon
*
* @param alignment title component alignment relative to text/icon
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setTitleComponentTextRelativeAlignment(Alignment alignment) {
TITLE_COMPONENT_TEXT_RELATIVE_ALIGNMENT.set(getMap(), alignment);
return this;
}
/**
* Gets the title components alignment relative to the text/icon
*
* @return title component alignment relative to text/icon
*/
public Alignment getTitleComponentTextRelativeAlignment() {
return TITLE_COMPONENT_TEXT_RELATIVE_ALIGNMENT.get(getMap());
}
/**
* Sets the direction, i.e. the line layout of the titled tab's components. The text
* and icon will be rotated in the given direction and the title component will be
* moved.
*
* @param direction direction
* @return this TitledTabStateProperties
*/
public TitledTabStateProperties setDirection(Direction direction) {
DIRECTION.set(getMap(), direction);
return this;
}
/**
* Gets the direction, i.e. the line layout of the titled tab components. The text
* and icon are rotated in the given direction and the title component will be moved.
*
* @return direction
*/
public Direction getDirection() {
return DIRECTION.get(getMap());
}
/**
* Gets the component properties.
*
* @return component properties
*/
public ComponentProperties getComponentProperties() {
return new ComponentProperties(COMPONENT_PROPERTIES.get(getMap()));
}
/**
* Gets the shaped panel properties.
*
* @return shaped panel properties
* @since ITP 1.2.0
*/
public ShapedPanelProperties getShapedPanelProperties() {
return new ShapedPanelProperties(SHAPED_PANEL_PROPERTIES.get(getMap()));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -