public interface IssueController
Every Issue is expected to provide at least some visual component. Typically this would be an Issue editor making it possible to create and modify issues.
When viewing, creating or editing a new Issue, the UI is presented in an
TopComponent in the editor area. Fire PROP_CHANGED
to notify the Issue
TopComponent that the UI state changed, IssueController.isChanged()
will be called
accordingly to determine if the IDE-s general SaveAction should be enabled.
On save or TopComponent close are then the saveChanges()
and discardUnsavedChanges()
methods called accordingly.
Modifier and Type | Field and Description |
---|---|
static String |
PROP_CHANGED
Fired when the data presented in the Issue UI were changed by the user.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Registers a PropertyChangeListener.
|
void |
closed()
Called when the component returned by this controller was closed.
|
boolean |
discardUnsavedChanges()
This method is called when Discard was chosen on close of an Issue TopComponent.
|
JComponent |
getComponent()
Returns a visual Issue component.
|
HelpCtx |
getHelpCtx()
Returns the help context associated with this controllers visual component.
|
boolean |
isChanged()
Determines whether the state of the UI has changed and is supposed to be saved.
|
void |
opened()
Called when the component returned by this controller was opened.
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Unregisters a PropertyChangeListener.
|
boolean |
saveChanges()
This method is called when the general IDE Save button is pressed or when
Save was chosen on close of an Issue TopComponent.
|
static final String PROP_CHANGED
JComponent getComponent()
HelpCtx getHelpCtx()
void opened()
void closed()
boolean saveChanges()
true
in case the save worked, otherwise false
boolean discardUnsavedChanges()
true
in case the discard worked, otherwise false
boolean isChanged()
true
in case there are changes to be saved, otherwise false
void addPropertyChangeListener(PropertyChangeListener l)
l
- a PropertyChangeListenervoid removePropertyChangeListener(PropertyChangeListener l)
l
- a PropertyChangeListener