|
RADi Runtime Library v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
de.muntjak.radiloader.FolderPanel
public class FolderPanel
A FolderPanel
is a RADi-special component:
a panel with a title where one can hide or show the content
by clicking in the title.
A FolderPanel
consists of a title button and
a content panel, whose layout manager is
NewLayout
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FolderPanel()
Constructs a new FolderPanel whose closed title
is "Show content" and whose opened title is
"Hide content". |
Method Summary | |
---|---|
void |
add(Component comp,
Object constraints)
Adds a component to the content panel. |
String |
getClosedTitle()
Returns the title displayed if the panel is closed. |
Border |
getContentBorder()
Returns the border of the content panel. |
Font |
getFont()
Returns the title button's font. |
LayoutManager |
getLayout()
Returns the content panel's layout manager, NewLayout by default. |
Dimension |
getMinimumSize()
Returns the value from getPreferredSize() . |
String |
getOpenTitle()
Returns the title displayed if the panel is opened. |
Dimension |
getPreferredSize()
Calculates and returns the preferred size dependent on the settings for retainWidth and retainHeight . |
boolean |
isClosed()
Returns the panel's closed state. |
boolean |
isRetainHeight()
Returns the retainHeight property value. |
boolean |
isRetainWidth()
Returns the retainWidth property value. |
void |
remove(Component comp)
Removes the specified component from the content panel. |
void |
removeAll()
Removes all components from the content panel. |
void |
setClosed(boolean closed)
Programmatically show or hide the content. |
void |
setClosedTitle(String s)
Sets the title string to be displayed if the panel is closed. |
void |
setContentBorder(Border border)
Sets the content panel's border. |
void |
setFont(Font f)
Sets the font of both the title button and the content panel. |
void |
setForeground(Color fg)
Sets the foregound color of both the title button and the content panel. |
void |
setLayout(LayoutManager layout)
Sets the content panel's layout manager. |
void |
setOpenTitle(String s)
Sets the title string to be displayed if the panel is opened. |
void |
setRetainHeight(boolean b)
Sets the retainHeight property. |
void |
setRetainWidth(boolean b)
Sets the retainWidth property. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FolderPanel()
FolderPanel
whose closed title
is "Show content" and whose opened title is
"Hide content". The panel is initially opened.
Method Detail |
---|
public void add(Component comp, Object constraints)
add
in class Container
constraints
- an NLConstraint
object you
get from one of the static NLConstraint
factory methods.NLConstraint
public String getClosedTitle()
public Border getContentBorder()
public Font getFont()
getFont
in interface MenuContainer
getFont
in class Component
public LayoutManager getLayout()
NewLayout
by default.
getLayout
in class Container
public Dimension getMinimumSize()
getPreferredSize()
.
getMinimumSize
in class JComponent
public String getOpenTitle()
public Dimension getPreferredSize()
retainWidth
and retainHeight
.
getPreferredSize
in class JComponent
setRetainWidth(boolean)
,
setRetainHeight(boolean)
public boolean isClosed()
closed
state.
closed
statepublic boolean isRetainHeight()
retainHeight
property value. If true
,
the preferred size of the folder panel will not change as the
closed state changes, if false
, the preferred size
of the folder panel will be calculated differently dependent
on its closed
state.
retainHeight
property valuepublic boolean isRetainWidth()
retainWidth
property value. If true
,
the preferred size of the folder panel will not change as the
closed state changes, if false
, the preferred size
of the folder panel will be calculated differently dependent
on its closed
state.
retainWidth
property valuepublic void remove(Component comp)
remove
in class Container
public void removeAll()
removeAll
in class Container
public void setClosed(boolean closed)
closed
- the new closed
statepublic void setClosedTitle(String s)
s
- the string to be displayed if the panel is closed.public void setContentBorder(Border border)
border
- some border or null
public void setFont(Font f)
setFont
in class JComponent
public void setForeground(Color fg)
setForeground
in class JComponent
public void setLayout(LayoutManager layout)
setLayout
in class Container
public void setOpenTitle(String s)
s
- the string to be displayed if the panel is opened.public void setRetainHeight(boolean b)
retainHeight
property. The default is
true
.
b
- if true
,
the preferred size of the folder panel will not change as the
closed state changes, if false
, the preferred size
of the folder panel will change as its closed
state
changes.public void setRetainWidth(boolean b)
retainWidth
property. The default is
true
.
b
- if true
,
the preferred size of the folder panel will not change as the
closed state changes, if false
, the preferred size
of the folder panel will change as its closed
state
changes.
|
RADi Runtime Library v1.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |