|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
com.jaxfront.swing.ui.tools.CollapsibleTitleBorder
public class CollapsibleTitleBorder
This class is the border of a OptionalPanel. It can visualise check box, arrow down or arrow up image, an image for new and an image for delete. Note that with the check box all components in the optioanl panel could be enabled or disabled, with the arrows the optional panel could be fade in or out and with new or delete a recursive view could be created or deleted.
Field Summary | |
---|---|
static int |
ABOVE_BOTTOM
|
static int |
ABOVE_TOP
|
static int |
BELOW_BOTTOM
|
static int |
BELOW_TOP
|
static int |
BOTTOM
|
static int |
CENTER
|
static int |
DEFAULT_JUSTIFICATION
|
static int |
DEFAULT_POSITION
|
static int |
LEFT
|
static int |
RIGHT
|
static int |
TOP
|
Constructor Summary | |
---|---|
CollapsibleTitleBorder(javax.swing.border.Border border)
Creates a OptionalTitledBorder instance with the specified border and an empty title. |
|
CollapsibleTitleBorder(javax.swing.border.Border border,
java.lang.String title)
Creates a OptionalTitleBorder instance with the specified border and title. |
|
CollapsibleTitleBorder(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition)
Creates a OptionalTitleBorder instance with the specified border, title, title-justification, and title-position. |
|
CollapsibleTitleBorder(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont)
Creates a OptionalTitleBorder instance with the specified border, title, title-justification, title-position, and title-font. |
|
CollapsibleTitleBorder(javax.swing.border.Border border,
java.lang.String title,
int titleJustification,
int titlePosition,
java.awt.Font titleFont,
java.awt.Color titleColor)
Creates a OptionalTitleBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color. |
|
CollapsibleTitleBorder(java.lang.String title)
Creates a OptionalTitleBorder instance. |
|
CollapsibleTitleBorder(java.lang.String title,
boolean isRecursive)
Creates a OptionalTitleBorder instance for a recursive view. |
|
CollapsibleTitleBorder(java.lang.String title,
boolean isRecursive,
float captionIndent)
Creates a OptionalTitleBorder instance for a recursive view. |
Method Summary | |
---|---|
boolean |
isChecked()
|
boolean |
isEnabled()
Determines whether this component is enabled. |
boolean |
isInCheckBox(java.awt.Point p)
Returns true if the point is in the check box rectangle which hide the childs or show the childs. |
boolean |
isInDeleteBox(java.awt.Point p)
Returns true if the point is in the delete check box rectangle to delete the recursive view. |
boolean |
isInNewBox(java.awt.Point p)
Returns true if the point is in the new check box rectangle to create a new recursive view |
boolean |
isInOptionalCheckBox(java.awt.Point p)
Returns true if the point is in the optional check box rectangle which enable or disable the childs. |
boolean |
isInTitelBox(java.awt.Point p)
Returns true if the point is in the titel check box rectangle which contains the text. |
boolean |
isOptional()
Returns true if the visualizer in the optional panel is optional. |
boolean |
isOptionalBoxChecked()
Returns true if the check box to enable or disable the childs is checked. |
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified position and size. |
void |
setChecked(boolean checked)
Sets the arrow to be displayed when the border is optional. |
void |
setEnabled(boolean enabled)
Enables or disables this component, depending on the value of the parameter b . |
void |
setOptional(boolean optional)
Sets the border optional or not. |
void |
setOptionalBoxChecked(boolean checked)
Sets the optional check box checked or not. |
void |
setUseOptionalCheckBox(boolean checked)
Sets the use the optional check box. |
boolean |
useOptionalCheckBox()
Returns true if the optional check box is use. |
Methods inherited from class javax.swing.border.TitledBorder |
---|
getBorder, getBorderInsets, getBorderInsets, getMinimumSize, getTitle, getTitleColor, getTitleFont, getTitleJustification, getTitlePosition, isBorderOpaque, setBorder, setTitle, setTitleColor, setTitleFont, setTitleJustification, setTitlePosition |
Methods inherited from class javax.swing.border.AbstractBorder |
---|
getInteriorRectangle, getInteriorRectangle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_POSITION
public static final int ABOVE_TOP
public static final int TOP
public static final int BELOW_TOP
public static final int ABOVE_BOTTOM
public static final int BOTTOM
public static final int BELOW_BOTTOM
public static final int DEFAULT_JUSTIFICATION
public static final int LEFT
public static final int CENTER
public static final int RIGHT
Constructor Detail |
---|
public CollapsibleTitleBorder(java.lang.String title)
title
- the title the border should displaypublic CollapsibleTitleBorder(java.lang.String title, boolean isRecursive)
title
- the title the border should displaypublic CollapsibleTitleBorder(java.lang.String title, boolean isRecursive, float captionIndent)
title
- the title the border should displaypublic CollapsibleTitleBorder(javax.swing.border.Border border)
border
- the borderpublic CollapsibleTitleBorder(javax.swing.border.Border border, java.lang.String title)
border
- the bordertitle
- the title the border should displaypublic CollapsibleTitleBorder(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition)
border
- the bordertitle
- the title the border should displaytitleJustification
- the justification for the titletitlePosition
- the position for the titlepublic CollapsibleTitleBorder(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont)
border
- the bordertitle
- the title the border should displaytitleJustification
- the justification for the titletitlePosition
- the position for the titletitleFont
- the font for rendering the titlepublic CollapsibleTitleBorder(javax.swing.border.Border border, java.lang.String title, int titleJustification, int titlePosition, java.awt.Font titleFont, java.awt.Color titleColor)
border
- the bordertitle
- the title the border should displaytitleJustification
- the justification for the titletitlePosition
- the position for the titletitleFont
- the font of the titletitleColor
- the color of the titleMethod Detail |
---|
public boolean isEnabled()
setEnabled
method.
true
if the component is enabled;
false
otherwise.setEnabled(boolean)
public boolean isInCheckBox(java.awt.Point p)
public boolean isInDeleteBox(java.awt.Point p)
public boolean isInNewBox(java.awt.Point p)
public boolean isInOptionalCheckBox(java.awt.Point p)
public boolean isInTitelBox(java.awt.Point p)
public boolean isOptional()
#setOptioanl(boolean)
public boolean isOptionalBoxChecked()
setOptionalBoxChecked(boolean)
public void paintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
paintBorder
in interface javax.swing.border.Border
paintBorder
in class javax.swing.border.TitledBorder
c
- the component for which this border is being paintedg
- the paint graphicsx
- the x position of the painted bordery
- the y position of the painted borderwidth
- the width of the painted borderheight
- the height of the painted borderpublic void setChecked(boolean checked)
checked
- if true the arrow down would be displayed.public boolean isChecked()
public void setEnabled(boolean enabled)
b
. An enabled component can respond to user
input and generate events. Components are enabled initially by default.
b
- If true
, this component is
enabled; otherwise this component is disabled.isEnabled()
public void setOptional(boolean optional)
optional
- if true the border is optionalisOptional()
public void setOptionalBoxChecked(boolean checked)
checked
- if true the optional check box is checkedisOptionalBoxChecked()
public void setUseOptionalCheckBox(boolean checked)
checked
- if true the optional check box are showinguseOptionalCheckBox()
public boolean useOptionalCheckBox()
#setUseOptionalCheckBox()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |