|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.dashboard.Dashboard
public class Dashboard
Dashboard
is the container that contain the GadgetContainer
s. GadgetContainer
contains the GadgetComponent
. Ideally, we would like Dashboard
to contain the gadget
directly without the help of the gadget container in between. It will require a customized layout manager which we
currently don't have. So right now we set the dashboard to grid layout and add gadget container to this grid layout.
Each gadget container is using JideBoxLayout.
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
COMPONENT_MAXIMIZED
The value return by getColumnIndex(javax.swing.JComponent) if the component is maximized
GadgetComponent. |
static int |
H_GAP
|
static String |
PROPERTY_COLUMN_COUNT
|
static String |
PROPERTY_ICON
|
static String |
PROPERTY_KEY
|
static String |
PROPERTY_TITLE
|
static int |
V_GAP
|
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 | |
---|---|
Dashboard()
|
|
Dashboard(String key)
|
|
Dashboard(String key,
String title)
|
|
Dashboard(String key,
String title,
Icon icon)
|
|
Dashboard(String key,
String title,
Icon icon,
int columnCount)
|
|
Dashboard(String key,
String title,
int columnCount)
|
Method Summary | |
---|---|
void |
addPlaceHolder()
|
void |
addPlaceHolder(Object constraints)
|
void |
addPlaceHolder(PlaceHolder placeHolder,
Object constraints)
|
protected PlaceHolder |
createDefaultPlaceHolder()
|
protected JPanel |
createMaximizedGadgetContainer()
Create maximized gadget container. |
protected JPanel |
createNormalGadgetContainer()
Deprecated. replaced by createNormalGadgetContainer(boolean) |
protected JPanel |
createNormalGadgetContainer(boolean columnResizable)
Create normal gadget container. |
protected JPanel |
createSubpanel()
Creates the panel for each column. |
void |
doLayout()
|
int |
getColumnCount()
Gets the number of columns. |
int |
getColumnIndex(JComponent gadgetComponent)
Get the column index of the GadgetComponent instance inside the dashboard. |
protected Component |
getComponentAtLeft(Point p)
|
protected Component |
getComponentAtTop(Point p)
|
protected Object |
getComponentConstraints(int index)
Gets the constraints defined in the layout while adding the component into the layout. |
protected LayoutManager |
getDashboardLayout(Container pane)
|
static int |
getDefaultColumnCount()
Gets the default column count. |
GadgetComponent[] |
getGadgetComponents()
Gets all GadgetComponents inside the dashboard. |
Container |
getGadgetContainer(int column)
Get the GadgetContainer instance in the designated column. |
Icon |
getIcon()
Gets the icon for the dashboard. |
protected ImageIcon |
getImageIcon(String name)
Gets the image icons that is used in Dashboard. |
String |
getKey()
Gets the key of this dashboard. |
PredefinedLayoutAdapter |
getLayoutAdapter()
Gets the layout adapter. |
LayoutManager |
getPredefinedLayout()
Gets predefined layout for the normal gadget container. |
Dimension |
getPreferredScrollableViewportSize()
|
int |
getRowIndex(JComponent gadgetComponent)
Get the row index of the GadgetComponent instance inside the dashboard. |
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
Map<String,String> |
getSettings()
Gets the settings. |
String |
getTitle()
Gets the title of this dashboard. |
protected void |
initDashboard()
Initializes the dashboard. |
boolean |
isColumnResizable()
Get the flag indicating if the column is resizable. |
boolean |
isPredefinedLayoutSet()
Checks if the predefined layout is configured. |
boolean |
isRowResizable()
|
boolean |
isShowGripper()
Get the flag indicating if Dashboard will show the gripper. |
void |
maximizeGadget(GadgetComponent component)
Deprecated. replaced by maximizeGadgetComponent(GadgetComponent) |
void |
maximizeGadget(int column,
int row)
Deprecated. replaced by maximizeGadgetComponent(int, int) |
void |
maximizeGadgetComponent(GadgetComponent component)
Maximize the designated GadgetComponent. |
void |
maximizeGadgetComponent(int index)
|
void |
maximizeGadgetComponent(int column,
int row)
Maximize the GadgetComponent in designated column and row. |
void |
removePredefinedGadgetPosition(int index)
|
void |
restoreGadget()
Deprecated. replaced by restoreGadgetComponent() |
void |
restoreGadgetComponent()
Restore the maximized GadgetComponent. |
void |
setColumnCount(int columnCount)
Sets the column count. |
void |
setColumnResizable(boolean columnResizable)
Set the flag indicating if the column is resizable. |
static void |
setDefaultColumnCount(int defaultColumnCount)
Sets the default column count. |
void |
setIcon(Icon icon)
Sets the icon for the dashboard. |
void |
setKey(String key)
Sets the key. |
void |
setLayoutAdapter(PredefinedLayoutAdapter layoutAdapter)
Sets the layout adapter. |
void |
setPredefinedLayout(LayoutManager predefinedLayout)
Sets predefined layout for the normal gadget container. |
void |
setRowResizable(boolean rowResizable)
|
void |
setSettings(Map<String,String> settings)
|
void |
setShowGripper(boolean showGripper)
Set the flag indicating if Dashboard will show the gripper. |
void |
setTitle(String title)
Sets the title. |
void |
showMaximizedGadgetContainer()
Show maximized gadget container. |
void |
showNormalGadgetContainer()
Show normal gadget container. |
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 |
Field Detail |
---|
public static final int H_GAP
public static final int V_GAP
public static final String PROPERTY_KEY
public static final String PROPERTY_TITLE
public static final String PROPERTY_ICON
public static final String PROPERTY_COLUMN_COUNT
public static final int COMPONENT_MAXIMIZED
getColumnIndex(javax.swing.JComponent)
if the component is maximized
GadgetComponent.
Constructor Detail |
---|
public Dashboard()
public Dashboard(String key)
public Dashboard(String key, String title)
public Dashboard(String key, String title, Icon icon)
public Dashboard(String key, String title, int columnCount)
public Dashboard(String key, String title, Icon icon, int columnCount)
Method Detail |
---|
public static int getDefaultColumnCount()
setDefaultColumnCount(int)
public static void setDefaultColumnCount(int defaultColumnCount)
defaultColumnCount
- the new default column count.protected void initDashboard()
public int getColumnIndex(JComponent gadgetComponent)
gadgetComponent
- the gadget component instance
COMPONENT_MAXIMIZED
if it is
maximized.public int getRowIndex(JComponent gadgetComponent)
gadgetComponent
- the gadget component instance
COMPONENT_MAXIMIZED
if it is maximized.@Deprecated protected JPanel createNormalGadgetContainer()
createNormalGadgetContainer(boolean)
protected JPanel createNormalGadgetContainer(boolean columnResizable)
columnResizable
- if the column is resizable.
protected Component getComponentAtLeft(Point p)
protected Component getComponentAtTop(Point p)
protected LayoutManager getDashboardLayout(Container pane)
public void addPlaceHolder()
public void addPlaceHolder(Object constraints)
public void addPlaceHolder(PlaceHolder placeHolder, Object constraints)
public void removePredefinedGadgetPosition(int index)
protected PlaceHolder createDefaultPlaceHolder()
protected ImageIcon getImageIcon(String name)
IconsFactory
to get the image icons.
Subclass can override this method to provide their own icon. The the value of the name parameter will be
"icons/dashboard.png".
name
- the icon name
protected JPanel createMaximizedGadgetContainer()
public void showNormalGadgetContainer()
public void showMaximizedGadgetContainer()
@Deprecated public void maximizeGadget(GadgetComponent component)
maximizeGadgetComponent(GadgetComponent)
component
- the gadget componentpublic void maximizeGadgetComponent(GadgetComponent component)
component
- the gadget component@Deprecated public void maximizeGadget(int column, int row)
maximizeGadgetComponent(int, int)
column
- the column indexrow
- the row indexpublic void maximizeGadgetComponent(int index)
public void maximizeGadgetComponent(int column, int row)
column
- the column indexrow
- the row index@Deprecated public void restoreGadget()
restoreGadgetComponent()
public void restoreGadgetComponent()
public void setShowGripper(boolean showGripper)
JideSplitPane.setShowGripper(boolean)
.
showGripper
- the flagpublic boolean isShowGripper()
JideSplitPane.isShowGripper()
is true. Otherwise false.protected JPanel createSubpanel()
public int getColumnCount()
public void setColumnCount(int columnCount)
columnCount
- the new column count.public void doLayout()
doLayout
in class Container
public String getTitle()
GadgetManager
.
public void setTitle(String title)
title
- the new title.public String getKey()
public void setKey(String key)
key
- the new key.public Icon getIcon()
public void setIcon(Icon icon)
icon
- the iconpublic Map<String,String> getSettings()
public void setSettings(Map<String,String> settings)
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface Scrollable
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface Scrollable
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface Scrollable
public GadgetComponent[] getGadgetComponents()
public Container getGadgetContainer(int column)
column
- the column index
public boolean isColumnResizable()
public void setColumnResizable(boolean columnResizable)
columnResizable
- the flagpublic boolean isRowResizable()
public void setRowResizable(boolean rowResizable)
public void setPredefinedLayout(LayoutManager predefinedLayout)
setLayoutAdapter(PredefinedLayoutAdapter)
to have layout adapter defined to have this
feature working.
predefinedLayout
- the layout managersetLayoutAdapter(PredefinedLayoutAdapter)
public LayoutManager getPredefinedLayout()
public boolean isPredefinedLayoutSet()
public void setLayoutAdapter(PredefinedLayoutAdapter layoutAdapter)
layoutAdapter
- the layout adapterpublic PredefinedLayoutAdapter getLayoutAdapter()
protected Object getComponentConstraints(int index)
index
- the index of the child component
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |