|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.ui.palette.customize.DefaultEntryPage
This is a default implementation of the EntryPage
interface. It displays the
entry's label, description and visible fields (and allows for their modification). It
is live in the sense that the model is updated with the changes immediately (on every
keystroke).
Constructor Summary | |
DefaultEntryPage()
|
Method Summary | |
void |
apply()
Being live, this method is completely ignored. |
void |
createControl(Composite parent,
PaletteEntry entry)
Creates the Control that displays the properties of the given entry. |
protected Text |
createDescText(Composite panel)
Creates the Text where the description of the entry is to be displayed. |
protected Button |
createHiddenCheckBox(Composite panel)
Creates the Button (CheckBox) for indicating the hidden status of the
entry. |
protected Label |
createLabel(Composite panel,
int style,
String text)
Creates a label |
protected Text |
createNameText(Composite panel)
Creates the Text where the name of the entry is to be displayed. |
protected Text |
createText(Composite panel,
int style,
String text)
Creates a Text . |
Control |
getControl()
Returns the Panel (Control) that has the properties of the entry. |
protected PaletteEntry |
getEntry()
Provides sub-classes with access to the entry this class is monitoring. |
protected String |
getMessage()
Sub-classes should override this method to provide appropriate error notification messages. |
protected EntryPageContainer |
getPageContainer()
|
protected int |
getPermission()
|
protected void |
handleDescriptionChanged(String text)
Updates the model with the change in the entry's description, and updates the state of the page. |
protected void |
handleHiddenSelected(boolean isChecked)
Updates the model with the change in the entry's hidden state, and updates the state of the page. |
protected void |
handleNameChanged(String text)
Updates the model with the change in the entry's name, and updates the state of the page. |
void |
setPageContainer(EntryPageContainer pageContainer)
Sets the page container for this page. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultEntryPage()
Method Detail |
public final void apply()
apply
in interface EntryPage
public void createControl(Composite parent, PaletteEntry entry)
EntryPage
createControl
in interface EntryPage
parent
- The Composite in which the Control has to be createdentry
- The entry whose properties have to be displayedEntryPage.createControl(Composite,
PaletteEntry)
protected Text createDescText(Composite panel)
Text
where the description of the entry is to be displayed.
panel
- The Composite in which the Text
is to be created
Text
protected Button createHiddenCheckBox(Composite panel)
Button
(CheckBox) for indicating the hidden status of the
entry. It initializes it with the current hidden state of entry.
panel
- The Composite in which the Button is to be created
protected Label createLabel(Composite panel, int style, String text)
panel
- The Composite in which the Label is to be createdstyle
- The stylebits for the Labeltext
- The Label's text
protected Text createNameText(Composite panel)
panel
- The Composite in which the Text is to be created
protected Text createText(Composite panel, int style, String text)
Text
. This method is mainly a result of code-factoring.
panel
- The Composite in which the Text is to be createdstyle
- The stylebits for the Texttext
- The text to be displayed in the Text
public Control getControl()
EntryPage
EntryPage.createControl(Composite,PaletteEntry)
.
getControl
in interface EntryPage
EntryPage.getControl()
protected PaletteEntry getEntry()
protected String getMessage()
protected EntryPageContainer getPageContainer()
EntryPageContainer
to which this page can report errors.protected void handleDescriptionChanged(String text)
Updates the model with the change in the entry's description, and updates the state of the page.
This method is invoked on every keystroke in the Text displaying the description of the entry.
text
- The new descriptionprotected void handleHiddenSelected(boolean isChecked)
Updates the model with the change in the entry's hidden state, and updates the state of the page.
This method is invokes whenever the "Hidden" checkbox is selected.
isChecked
- The new selection valueprotected void handleNameChanged(String text)
Updates the model with the change in the entry's name, and updates the state of the page.
This method is invoked on every keystroke in the Text displaying the entry's name.
text
- The new nameprotected int getPermission()
public void setPageContainer(EntryPageContainer pageContainer)
EntryPage
setPageContainer
in interface EntryPage
pageContainer
- The EntryPageContainer
to which this page can
report errorsEntryPage.setPageContainer(EntryPageContainer)
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |