|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.plaf.BuddyLayoutAndBorder
public class BuddyLayoutAndBorder
Constructor Summary | |
---|---|
BuddyLayoutAndBorder()
|
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component comp)
Does nothing. |
protected int |
centerY(Rectangle rect,
Dimension size)
|
Border |
getBorderDelegate()
|
Insets |
getBorderInsets(Component c)
Returns the Insets of the original Border plus the space
required by the child components. |
Insets |
getRealBorderInsets()
Returns the insets of the original border (without the margin! Beware of BasicBorders.MarginBorder !). |
protected Rectangle |
getVisibleRect()
|
protected void |
install(JTextField textField)
Installs a BuddyLayoutAndBorder as a layout and border of the
given text field. |
boolean |
isBorderOpaque()
Returns whether or not the border is opaque. |
void |
layoutContainer(Container parent)
Lays out the specified container. |
Dimension |
minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains. |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the border for the specified component with the specified position and size. |
Dimension |
preferredLayoutSize(Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains. |
void |
propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed. |
void |
removeLayoutComponent(Component comp)
Does nothing. |
protected void |
replaceBorderIfNecessary()
Wraps and replaces the text fields default border with this object, to honor the button margins and sizes of the search, clear and popup buttons and the layout style. |
String |
toString()
Returns a string representation of the object. |
void |
uninstall()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BuddyLayoutAndBorder()
Method Detail |
---|
protected void install(JTextField textField)
BuddyLayoutAndBorder
as a layout and border of the
given text field. Registers a PropertyChangeListener
to wrap any
subsequently set border on the text field.
public Border getBorderDelegate()
protected void replaceBorderIfNecessary()
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- the string to be associated with the componentcomp
- the component to be addedBuddySupport#add(javax.swing.JComponent, Position, JTextField)
public Dimension minimumLayoutSize(Container parent)
java.awt.LayoutManager
minimumLayoutSize
in interface LayoutManager
parent
- the component to be laid outLayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension preferredLayoutSize(Container parent)
java.awt.LayoutManager
preferredLayoutSize
in interface LayoutManager
parent
- the container to be laid outLayoutManager.minimumLayoutSize(java.awt.Container)
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to be removedBuddySupport.remove(javax.swing.JComponent, JTextField)
public void layoutContainer(Container parent)
java.awt.LayoutManager
layoutContainer
in interface LayoutManager
parent
- the container to be laid outprotected int centerY(Rectangle rect, Dimension size)
protected Rectangle getVisibleRect()
public Insets getBorderInsets(Component c)
Insets
of the original Border
plus the space
required by the child components.
getBorderInsets
in interface Border
c
- the component for which this border insets value appliesBorder.getBorderInsets(java.awt.Component)
public Insets getRealBorderInsets()
BasicBorders.MarginBorder
!).
public boolean isBorderOpaque()
javax.swing.border.Border
isBorderOpaque
in interface Border
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
javax.swing.border.Border
paintBorder
in interface Border
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 propertyChange(PropertyChangeEvent evt)
java.beans.PropertyChangeListener
propertyChange
in interface PropertyChangeListener
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.public void uninstall()
public String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |