public class DefaultEntryPage extends java.lang.Object implements EntryPage
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 and Description |
---|
DefaultEntryPage() |
Modifier and Type | Method and Description |
---|---|
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,
java.lang.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,
java.lang.String text)
Creates a
Text . |
Control |
getControl()
Returns the Panel (Control) that displays the properties of the entry.
|
protected PaletteEntry |
getEntry()
Provides sub-classes with access to the entry this class is monitoring.
|
protected java.lang.String |
getMessage()
Sub-classes should override this method to provide appropriate error
notification messages.
|
protected EntryPageContainer |
getPageContainer() |
protected int |
getPermission() |
protected void |
handleDescriptionChanged(java.lang.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(java.lang.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.
|
public final void apply()
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 createdText
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 createdprotected Label createLabel(Composite panel, int style, java.lang.String text)
panel
- The Composite in which the Label is to be createdstyle
- The stylebits for the Labeltext
- The Label's textprotected Text createNameText(Composite panel)
panel
- The Composite in which the Text is to be createdprotected Text createText(Composite panel, int style, java.lang.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 Textpublic Control getControl()
EntryPage
EntryPage.createControl(Composite,PaletteEntry)
.getControl
in interface EntryPage
EntryPage.getControl()
protected PaletteEntry getEntry()
protected java.lang.String getMessage()
protected EntryPageContainer getPageContainer()
EntryPageContainer
to which this page can report
errors.protected void handleDescriptionChanged(java.lang.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(java.lang.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)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.