|
org.openide.io 1.20.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.windows.IOContainer
public final class IOContainer
IOContainer is accessor class to parent container of IO tabs for IOProvider implementations.
Default IOContainer (corresponding to Output window) can be obtained via getDefault()
.
If you want to add IO components (tabs) to your own component you need to:
IOContainer.Provider
IOContainer
via factory method create(org.openide.windows.IOContainer.Provider)
IOContainer
to IOProvider.getIO(java.lang.String, javax.swing.Action[], org.openide.windows.IOContainer)
Nested Class Summary | |
---|---|
static interface |
IOContainer.CallBacks
Callbacks from IOContainer to child component corresponding to IO |
static interface |
IOContainer.Provider
SPI for providers of parent container for IO components (tabs) |
Method Summary | |
---|---|
void |
add(JComponent comp,
IOContainer.CallBacks cb)
Adds component to parent container |
static IOContainer |
create(IOContainer.Provider provider)
Factory method for IOContainer instances |
static IOContainer |
getDefault()
Gets the default container according to a generic IOContainer.Provider . |
JComponent |
getSelected()
Gets currently selected component in parent container |
boolean |
isActivated()
Checks if parent container is activated |
boolean |
isCloseable(JComponent comp)
Checks whether comp can be closed (e.g. |
void |
open()
Opens parent container |
void |
remove(JComponent comp)
Removes component from parent container |
void |
requestActive()
Activates parent container |
void |
requestVisible()
Selects parent container (if it is opened), but does not activate it |
void |
select(JComponent comp)
Selects component in parent container |
void |
setIcon(JComponent comp,
Icon icon)
Sets icon for provided component |
void |
setTitle(JComponent comp,
String name)
Sets title for provided component |
void |
setToolbarActions(JComponent comp,
Action[] toolbarActions)
Sets toolbar actions for provided component |
void |
setToolTipText(JComponent comp,
String text)
Sets tool tip text for provided component |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IOContainer create(IOContainer.Provider provider)
provider
- Provider implemantation
public static IOContainer getDefault()
IOContainer.Provider
.
Normally this is taken from Lookup.getDefault()
but if there is no
instance in lookup, a fallback instance is created which can be useful for
unit tests and perhaps for standalone usage of various libraries.
public void open()
public void requestActive()
public void requestVisible()
public boolean isActivated()
public void add(JComponent comp, IOContainer.CallBacks cb)
comp
- component to be addedcb
- callbacks for added component or null if not interested in notificationsIOContainer.CallBacks
public void remove(JComponent comp)
comp
- component that should be removedpublic void select(JComponent comp)
comp
- component that should be selectedpublic JComponent getSelected()
public void setTitle(JComponent comp, String name)
comp
- component for which title should be setname
- component titlepublic void setToolTipText(JComponent comp, String text)
comp
- component for which title should be settext
- component titlepublic void setIcon(JComponent comp, Icon icon)
comp
- component for which icon should be seticon
- component iconpublic void setToolbarActions(JComponent comp, Action[] toolbarActions)
comp
- component for which actions should be settoolbarActions
- toolbar actions for componentpublic boolean isCloseable(JComponent comp)
comp
- component which should be closeable
|
org.openide.io 1.20.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |