public abstract class PaletteLayout<L extends java.awt.LayoutManager>
extends java.lang.Object
implements java.awt.LayoutManager2, java.awt.event.KeyListener
PaletteLayout interface defines the contract for a
class that can layout the items for a PaletteDockable2
implementation.| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_SEPARATOR_HEIGHT |
protected L |
impl |
static java.lang.Class<? extends oracle.ideimpl.palette2.PaletteGroupUI> |
PALETTE_GROUP_UI_KEY
The
PALETTE_GROUP_UI_KEY is used to
get a client property representing
the PaletteGroupUI. |
static java.lang.Class<? extends oracle.ideimpl.palette2.PaletteSectionUI> |
PALETTE_SECTION_UI_KEY
The
PALETTE_SECTION_UI_KEY is used to
get a client property representing
the PaletteSectionUI. |
protected static float |
SEPARATOR_HEIGHT_FUDGE_FACTOR |
protected static float |
SEPARATOR_WIDTH_FUDGE_FACTOR |
| Constructor and Description |
|---|
PaletteLayout(L impl) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints) |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp) |
protected abstract void |
configurePaletteItemUI(oracle.ideimpl.palette2.PaletteItemUI itemUI) |
protected abstract void |
configurePaletteSectionUI(oracle.ideimpl.palette2.PaletteSectionUI sectionUI) |
protected oracle.ideimpl.palette2.PaletteGroupUI |
getGroupUI(javax.swing.JComponent component) |
protected oracle.ideimpl.palette2.PaletteItemUI |
getItemAbove(oracle.ideimpl.palette2.PaletteItemUI current)
Get the item "above" the given item, meaning in the row directly above.
|
protected oracle.ideimpl.palette2.PaletteItemUI |
getItemAfter(oracle.ideimpl.palette2.PaletteItemUI current)
Get the item "after" the given item, meaning immediately adjacent on the
right.
|
protected oracle.ideimpl.palette2.PaletteItemUI |
getItemBefore(oracle.ideimpl.palette2.PaletteItemUI current)
Get the item "before" the given item, meaning immediately adjacent on the
left.
|
protected oracle.ideimpl.palette2.PaletteItemUI |
getItemBelow(oracle.ideimpl.palette2.PaletteItemUI current)
Get the item "below" the given item, meaning in the row directly below.
|
float |
getLayoutAlignmentX(java.awt.Container target) |
float |
getLayoutAlignmentY(java.awt.Container target) |
protected int |
indexOf(oracle.ideimpl.palette2.PaletteItemUI itemUI) |
void |
invalidateLayout(java.awt.Container target) |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
layoutContainer(java.awt.Container parent)
Subclasses that override this method are expected to call this
implementation before finishing.
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent) |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent) |
void |
removeLayoutComponent(java.awt.Component comp) |
public static java.lang.Class<? extends oracle.ideimpl.palette2.PaletteGroupUI> PALETTE_GROUP_UI_KEY
PALETTE_GROUP_UI_KEY is used to
get a client property representing
the PaletteGroupUI.public static java.lang.Class<? extends oracle.ideimpl.palette2.PaletteSectionUI> PALETTE_SECTION_UI_KEY
PALETTE_SECTION_UI_KEY is used to
get a client property representing
the PaletteSectionUI.protected static final float SEPARATOR_HEIGHT_FUDGE_FACTOR
protected static final float SEPARATOR_WIDTH_FUDGE_FACTOR
protected static final int DEFAULT_SEPARATOR_HEIGHT
protected L extends java.awt.LayoutManager impl
public PaletteLayout(L impl)
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerpublic void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerparent - public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagerprotected abstract void configurePaletteItemUI(oracle.ideimpl.palette2.PaletteItemUI itemUI)
protected abstract void configurePaletteSectionUI(oracle.ideimpl.palette2.PaletteSectionUI sectionUI)
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerprotected oracle.ideimpl.palette2.PaletteItemUI getItemAbove(oracle.ideimpl.palette2.PaletteItemUI current)
PaletteItemUI is in focus. This
implementation simply returns the given PaletteItemUI.current - PaletteItemUI directly "above" the given
PaletteItemUI in the component paletteprotected oracle.ideimpl.palette2.PaletteItemUI getItemBelow(oracle.ideimpl.palette2.PaletteItemUI current)
PaletteItemUI is in focus. This
implementation simply returns the given PaletteItemUI.current - PaletteItemUI directly "below" the given
PaletteItemUI in the component paletteprotected oracle.ideimpl.palette2.PaletteItemUI getItemBefore(oracle.ideimpl.palette2.PaletteItemUI current)
PaletteItemUI is in focus. This
implementation returns the PaletteItemUI whose position/index
is one before the given item. If the given item is the first item, then it
will be returned.current - PaletteItemUI directly "before" the given
PaletteItemUI in the component paletteprotected oracle.ideimpl.palette2.PaletteItemUI getItemAfter(oracle.ideimpl.palette2.PaletteItemUI current)
PaletteItemUI is in focus. This
implementation returns the PaletteItemUI whose position/index
is one aftger the given item. If the given item is the last item, then it
will be returned.current - PaletteItemUI directly "after" the given
PaletteItemUI in the component paletteprotected int indexOf(oracle.ideimpl.palette2.PaletteItemUI itemUI)
protected oracle.ideimpl.palette2.PaletteGroupUI getGroupUI(javax.swing.JComponent component)