|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
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
com.ehsbe.commons.gui.JxPanel
public class JxPanel
An JPanel, which implements Baseline behavior by setting the index of the component, whoms baseline (or bottom) should be used as baseline for this panel.
setBaselineIdx(int)
,
Serialized FormNested 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.BaselineResizeBehavior, 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 | |
---|---|
JxPanel()
Creates a new JPanel with a double buffer and a flow
layout. |
|
JxPanel(boolean isDoubleBuffered)
Creates a new JPanel with FlowLayout and
the specified buffering strategy. |
|
JxPanel(LayoutManager layout)
Create a new buffered JPanel with the specified layout manager |
|
JxPanel(LayoutManager layout,
boolean isDoubleBuffered)
Creates a new JPanel with the specified layout manager and buffering strategy. |
Method Summary | |
---|---|
int |
getBaseline(int width,
int height)
Get the baseline for this panel, or a value less than 0 if the baseline can not be determined. |
int |
getBaselineIdx()
Get the index of the component, which should be used to determine the baseline of the panel. |
void |
setBaselineIdx(int baselineIdx)
Set the index of the component used to determine the baseline of this panel. |
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 JxPanel(LayoutManager layout, boolean isDoubleBuffered)
layout
- the LayoutManager to useisDoubleBuffered
- a boolean, true for double-buffering, which uses additional
memory space to achieve fast, flicker-free updatespublic JxPanel(LayoutManager layout)
layout
- the LayoutManager to usepublic JxPanel(boolean isDoubleBuffered)
JPanel
with FlowLayout
and
the specified buffering strategy. If isDoubleBuffered
is
true, the JPanel
will use a double buffer.
isDoubleBuffered
- a boolean, true for double-buffering, which uses additional
memory space to achieve fast, flicker-free updatespublic JxPanel()
JPanel
with a double buffer and a flow
layout.
Method Detail |
---|
public int getBaselineIdx()
If not set (i.e. the index is < 0), the panel will pick first
component, which returns a baseline > -1 automatically.
If otherwise out of range, i.e. the index points
to a none-existing component, a baseline of -1
gets returned.
-1
if not set, the index of the component otherwise.setBaselineIdx(int)
public void setBaselineIdx(int baselineIdx)
baselineIdx
- index of the component to be used for baseline computation.
If negativ, the first JComponent with a baseline > 0 will be used.getBaselineIdx()
,
Container.getComponent(int)
public int getBaseline(int width, int height)
getBaseline
in class JComponent
width
- Width of the internal component to determine baseline for.height
- Height of the internal component to determine baseline for.
|
ehsbe CommonsTM Version 1.1.0rc3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |