|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Overlayable
Overlayable
provides a way to add a number of components on top of another component as the overlay
components. Usually we make a component implementing Overlayable interface although it is not required. This
interface will allow user to add/remove other components as overlay components and set their location independently.
Field Summary | |
---|---|
static String |
CLIENT_PROPERTY_OVERLAYABLE
Client property. |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Method Summary | |
---|---|
void |
addOverlayComponent(JComponent component)
Adds an overlay component to the center. |
void |
addOverlayComponent(JComponent component,
int location)
Adds an overlay component at the specified location. |
void |
addOverlayComponent(JComponent component,
int location,
int index)
Adds an overlay component at the specified location. |
JComponent[] |
getOverlayComponents()
Gets the overlay component. |
int |
getOverlayLocation(JComponent component)
Gets the overlay component location. |
Insets |
getOverlayLocationInsets()
Gets the insets of the overlay component relative to the border of the component. |
void |
removeOverlayComponent(JComponent component)
Removes an overlay component that was added before. |
void |
setOverlayLocation(JComponent component,
int location)
Sets the overlay component location. |
void |
setOverlayLocationInsets(Insets insets)
Sets the insets of the overlay component relative to the border of the component. |
void |
setOverlayVisible(boolean visible)
Sets all the overlay components visible or invisible. |
Field Detail |
---|
static final String CLIENT_PROPERTY_OVERLAYABLE
Method Detail |
---|
void addOverlayComponent(JComponent component)
component
- the overlay component.void addOverlayComponent(JComponent component, int location)
SwingConstants.CENTER
SwingConstants.SOUTH
SwingConstants.NORTH
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH_EAST
SwingConstants.NORTH_WEST
SwingConstants.SOUTH_EAST
SwingConstants.SOUTH_WEST
component
- the overlay component.location
- the overlay location.void addOverlayComponent(JComponent component, int location, int index)
SwingConstants.CENTER
SwingConstants.SOUTH
SwingConstants.NORTH
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH_EAST
SwingConstants.NORTH_WEST
SwingConstants.SOUTH_EAST
SwingConstants.SOUTH_WEST
component
- the overlay component.location
- the overlay location.index
- the overlay index. 0 means the first overlay component. -1 means the last overlay component.void removeOverlayComponent(JComponent component)
component
- JComponent[] getOverlayComponents()
void setOverlayLocation(JComponent component, int location)
SwingConstants.CENTER
SwingConstants.SOUTH
SwingConstants.NORTH
SwingConstants.WEST
SwingConstants.EAST
SwingConstants.NORTH_EAST
SwingConstants.NORTH_WEST
SwingConstants.SOUTH_EAST
SwingConstants.SOUTH_WEST
location
- the overlay component location.int getOverlayLocation(JComponent component)
Insets getOverlayLocationInsets()
void setOverlayLocationInsets(Insets insets)
insets
- the insets of the overlay component relative to the border of the component.void setOverlayVisible(boolean visible)
visible
- true to set it visible. False to invisible.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |