|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.ui.AbstractUIInputReceiver org.gudy.azureus2.ui.swt.pluginsimpl.AbstractUISWTInputReceiver
public abstract class AbstractUISWTInputReceiver
Extended abstract class which implements the bulk of logic required for the UISWTInputReceiver interface.
Field Summary | |
---|---|
protected String[] |
choices
|
protected boolean |
choices_allow_edit
|
protected int |
choices_default
|
protected int |
line_height
|
protected boolean |
select_preentered_text
|
protected int[] |
select_preentered_text_range
|
protected int |
width_hint
|
Fields inherited from class org.gudy.azureus2.pluginsimpl.local.ui.AbstractUIInputReceiver |
---|
allow_empty_input, maintain_whitespace, messages, multiline_mode, preentered_text, receiver_listener, title, validator |
Constructor Summary | |
---|---|
AbstractUISWTInputReceiver()
|
Method Summary | |
---|---|
void |
selectPreenteredText(boolean select)
Indicates whether you want the preentered text to be selected (highlighted) or not. |
void |
selectPreenteredTextRange(int[] range)
|
void |
setLineHeight(int line_height)
Indicates how many lines by default to show the user to enter input. |
void |
setPreenteredText(String text,
boolean as_suggested)
This sets a value to be displayed as pre-entered text for the input. |
void |
setSelectableItems(String[] choices,
int default_choice,
boolean allow_edit)
Changes the entry box to be a combo box, where the values passed are selectable. |
void |
setWidthHint(int width)
Indicates how wide you want the text entry window to be. |
Methods inherited from class org.gudy.azureus2.pluginsimpl.local.ui.AbstractUIInputReceiver |
---|
allowEmptyInput, assertPostPrompt, assertPrePrompt, getSubmittedInput, hasSubmittedInput, isResultRecorded, localise, maintainWhitespace, prompt, prompt, promptForInput, recordUserAbort, recordUserInput, setInputValidator, setLocalisedMessage, setLocalisedMessages, setLocalisedTitle, setMessage, setMessages, setMultiLine, setTitle, triggerReceiverListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.gudy.azureus2.plugins.ui.UIInputReceiver |
---|
allowEmptyInput, getSubmittedInput, hasSubmittedInput, maintainWhitespace, prompt, prompt, setInputValidator, setLocalisedMessage, setLocalisedMessages, setLocalisedTitle, setMessage, setMessages, setMultiLine, setTextLimit, setTitle |
Field Detail |
---|
protected boolean select_preentered_text
protected int[] select_preentered_text_range
protected int line_height
protected int width_hint
protected String[] choices
protected boolean choices_allow_edit
protected int choices_default
Constructor Detail |
---|
public AbstractUISWTInputReceiver()
Method Detail |
---|
public void selectPreenteredText(boolean select)
UISWTInputReceiver
true
.
selectPreenteredText
in interface UISWTInputReceiver
public void selectPreenteredTextRange(int[] range)
public void setLineHeight(int line_height)
UISWTInputReceiver
setLineHeight
in interface UISWTInputReceiver
public void setWidthHint(int width)
UISWTInputReceiver
setWidthHint
in interface UISWTInputReceiver
public void setPreenteredText(String text, boolean as_suggested)
UIInputReceiver
The text may appear in the same location as the text should be entered (allowing it to be directly overwritten or submitted immediately) - but some interfaces may not support this.
A flag should be passed indicating whether the pre-entered text is being entered as a suggestion for a value, or whether it is an old value being currently stored. Some interfaces may choose to differentiate between the two.
setPreenteredText
in interface UIInputReceiver
setPreenteredText
in class AbstractUIInputReceiver
text
- The text to pre-enter.as_suggested
- true if the value is a suggested
input value, false if it is an old value.public void setSelectableItems(String[] choices, int default_choice, boolean allow_edit)
UISWTInputReceiver
setSelectableItems
in interface UISWTInputReceiver
choices
- The list of options to be made available.default_choice
- Index of the option to present by default.allow_edit
- true if you still want to allow the user to enter
their own text, false if you want to restrict them to the choices
here.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |