|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.jdesktop.jdnc.JNComponent
Base class for all JN components.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected Icon |
image
|
protected MessageSourceSupport |
support
A reference to the MessageSourceSupport. |
protected JToolBar |
toolBar
|
| 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 | |
JNComponent()
Creates a new JNComponent configured with an instance of BorderLayout. |
|
| Method Summary | |
JButton |
addAction(Action action)
Adds the specified action to the end of the tool bar for this component. |
void |
addMessageListener(MessageListener l)
Register the MessageListener. |
void |
addSeparator()
Adds a separator to the end of the tool bar, if any, for this component. |
protected JToolBar |
addToolBar()
|
void |
addToolBarComponent(JComponent component)
|
boolean |
doCommand(Object command,
Object value)
Perform the command using the object value. |
Icon |
getBackgroundImage()
Returns the background image for the component. |
Object[] |
getCommands()
Returns an array of supported commands. |
JComponent |
getComponent()
|
MessageListener[] |
getMessageListeners()
Returns an array of listeners. |
JPopupMenu |
getPopupMenu()
|
boolean |
hasCommand(Object command)
Return a flag that indicates if a command is supported. |
void |
paint(Graphics g)
|
void |
removeMessageListener(MessageListener l)
Unregister the MessageListener from the MessageSource. |
protected void |
sendMessage(String message)
Convenience method to send a transient message to the MessageListeners |
void |
setBackgroundImage(Icon image)
Sets the background image for a transparent or translucent component. |
void |
setComponent(JComponent component)
Set the component that this JNComponent wraps. |
void |
setFont(Font font)
|
void |
setPopupMenu(JPopupMenu popup)
Sets the popup menu for this component. |
| 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 |
protected MessageSourceSupport support
protected JToolBar toolBar
protected Icon image
| Constructor Detail |
public JNComponent()
BorderLayout.
| Method Detail |
public void setComponent(JComponent component)
public JComponent getComponent()
public boolean doCommand(Object command,
Object value)
Targetable
doCommand in interface Targetablecommand - is a Action.ACTION_COMMAND_KEYvalue - an arbitrary value. Usually this will be
EventObject which trigered the command.public Object[] getCommands()
Targetable
getCommands in interface Targetablepublic boolean hasCommand(Object command)
Targetable
hasCommand in interface Targetablecommand - is a Action.ACTION_COMMAND_KEY
public void addMessageListener(MessageListener l)
MessageSource
addMessageListener in interface MessageSourcel - the listener to registerpublic void removeMessageListener(MessageListener l)
MessageSource
removeMessageListener in interface MessageSourcel - the listener to unregisterpublic MessageListener[] getMessageListeners()
MessageSource
getMessageListeners in interface MessageSourceprotected void sendMessage(String message)
message - text of message to sendpublic JButton addAction(Action action)
action - the action added to the tool bar
public void addSeparator()
public void addToolBarComponent(JComponent component)
public void setFont(Font font)
public void setPopupMenu(JPopupMenu popup)
public JPopupMenu getPopupMenu()
public Icon getBackgroundImage()
public void setBackgroundImage(Icon image)
image - specifies the background image for the componentpublic void paint(Graphics g)
protected JToolBar addToolBar()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||