public abstract class ViewHeaderBarExtension
extends java.lang.Object
createExtension()
to create your extension components and use apply()
to apply the header bar extension
to the specified view.Modifier and Type | Field and Description |
---|---|
protected LanguageFile |
langFile
the language file or
null |
protected java.lang.String |
langID
the language id
|
protected boolean |
separated
flag that indicates if the extension should be separated
|
protected View |
view
the view its header bar is extended by this extension
|
Constructor and Description |
---|
ViewHeaderBarExtension(View view,
boolean separated,
LanguageFile langFile,
java.lang.String langID)
Creates a new header bar extension.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addComponent(javax.swing.JComponent component)
Adds a component to the extension.
|
protected void |
addSeparator()
Adds a separator to the extension.
|
void |
apply()
Applies the extension to the view's header bar.
|
protected abstract void |
createExtension()
Creates the extension.
|
void |
remove()
Removes the extension for the header bar of the corresponding view.
|
protected final View view
protected final boolean separated
protected final LanguageFile langFile
null
protected final java.lang.String langID
public ViewHeaderBarExtension(View view, boolean separated, LanguageFile langFile, java.lang.String langID) throws java.lang.IllegalArgumentException
view
- the view its header bar should be extended by this extensionseparated
- true
if a separator should be added automatically at the end of creating the extension otherwise false
langFile
- the language file or null
if the extension should not use language dependent labels, tooltips or messages (in this case the predefined labels, tooltips and messages should be shown)langID
- the language idjava.lang.IllegalArgumentException
- public final void apply()
public final void remove()
protected abstract void createExtension()
addComponent(JComponent)
and addSeparator()
to create your extension.
protected final void addComponent(javax.swing.JComponent component) throws java.lang.IllegalArgumentException
component
- the componentjava.lang.IllegalArgumentException
- protected final void addSeparator()