com.gargoylesoftware.base.gui
public class DelayedComponentLoaderPanel extends JComponent
The following sample will create a delayed loader with a default "please wait" message.
final DelayedComponentLoaderPanel panel = new DelayedComponentLoaderPanel(); panel.setComponentLoader( new DefaultComponentLoader(MyExpensiveComponent.class) );This sample has a custom message.
final JLabel label = new JLabel("My custom wait message"); final DelayedComponentLoaderPanel panel = new DelayedComponentLoaderPanel(label); panel.setComponentLoader( new DefaultComponentLoader(MyExpensiveComponent.class) );
Version: $Revision: 1.6 $
Field Summary | |
---|---|
Set | listeners_ |
static int | LOADER_FINISHED |
static int | LOADER_STARTED |
static long | serialVersionUID |
Component | waitingComponent_ |
Constructor Summary | |
---|---|
DelayedComponentLoaderPanel()
Create a new panel that will display a simple "please wait" message
when it is loading. | |
DelayedComponentLoaderPanel(Component waitingComponent)
Create a new panel that will display the specified waitingComponent
while it is loading.
|
Method Summary | |
---|---|
void | addDelayedComponentLoaderListener(DelayedComponentLoaderListener listener)
Add the specified listener.
|
protected void | assertNotNull(String fieldName, Object object)
Throw an exception if the specified object is null |
void | fireComponentLoadingEvent(int action, ComponentLoader loader, Component loadedComponent)
Fire the component loading event. |
void | removeDelayedComponentLoaderListener(DelayedComponentLoaderListener listener)
Remove the specified listener. |
void | replaceComponent(Component component)
Replace the current child with the specified component |
void | setComponentLoader(ComponentLoader loader)
Set the new component loader. |
Parameters: waitingComponent The component to display while loading is in progress.
Parameters: listener The new listener
Parameters: fieldName The name of the paremeter we are checking object The value of the parameter we are checking
Parameters: action The action id loader The loader loadedComponent The component that was just loaded.
Parameters: listener the listener to remove.
Parameters: component The new component.
Parameters: loader The new component loader.