|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.xtools.pluglets.Pluglet
Provides pluglet properties and basic services used by pluglets.
Use the getName
method to retrieve the name of the
pluglet. Use the getDirectory
method to retrieve the
full path of the pluglet directory.
To use these properties and basic services, a pluglet class must extend this class. Use of this class and extending the class is optional.
Field Summary | |
PrintWriter |
out
The output for this pluglet. |
Constructor Summary | |
Pluglet()
|
Method Summary | |
boolean |
confirm(String message)
Displays a message dialog with OK and Cancel buttons. |
boolean |
confirm(String message,
String title)
Displays a message dialog with OK and Cancel buttons and the given title. |
void |
dumpStack()
Prints a stack trace of the current thread to the pluglet output writer. |
void |
dumpStack(PrintWriter writer)
Prints a stack trace of the current thread to the specified print writer. |
void |
error(String message)
Displays an error dialog with an OK button. |
void |
error(String message,
String title)
Displays an error dialog with an OK button and the given title. |
IPlugletMessageDialog |
getDialog()
Retrieves the host's IPlugletMessageDialog
implementation. |
String |
getDirectory()
Retrieves the full path of the pluglet directory. |
String |
getFile()
Retrieves the full path of the pluglet file. |
String |
getFullName()
Retrieves the full name of the pluglet. |
String |
getName()
Retrieves the name of the pluglet. |
void |
inform(String message)
Displays an information dialog with an OK button. |
void |
inform(String message,
String title)
Displays an information dialog with an OK button and the given title. |
void |
printStackTrace(Throwable t)
Prints the throwable and its backtrace to the pluglet output writer. |
void |
printStackTrace(Throwable t,
PrintWriter writer)
Prints the throwable and its backtrace to the specified print writer. |
String |
prompt(String message)
Displays an input dialog with a prompt message, a text input field, and OK and Cancel buttons. |
String |
prompt(String message,
String initialText)
Displays an input dialog with a prompt message, the text input field initial text, and OK and Cancel buttons. |
String |
prompt(String message,
String initialText,
String title)
Displays an input dialog with a prompt message, the text input field initial text, the title, and OK button and Cancel buttons. |
boolean |
question(String message)
Displays a question message dialog with Yes and
No buttons. |
boolean |
question(String message,
String title)
Displays a question message dialog with Yes and No buttons and the given title. |
void |
setDialog(IPlugletMessageDialog dialog)
Sets the host's IPlugletMessageDialog
implementation. |
void |
setDirectory(String directory)
Sets the full path of the pluglet directory. |
void |
setFile(String file)
Sets the full path of the pluglet file. |
void |
setFullName(String fullName)
Sets the full name of the pluglet. |
void |
setName(String name)
Sets the name of the pluglet. |
void |
warning(String message)
Displays a warning dialog with an OK button. |
void |
warning(String message,
String title)
Displays a warning dialog with an OK button and the given title. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public PrintWriter out
Constructor Detail |
public Pluglet()
Method Detail |
public String getName()
public void setName(String name)
public String getFullName()
public void setFullName(String fullName)
public String getFile()
public void setFile(String file)
public String getDirectory()
public void setDirectory(String directory)
public boolean confirm(String message, String title)
message
- The message to be displayed.title
- The title of the message dialog.
boolean
value of true
when the OK button is pressed. Otherwise,
it returns a value of false
.public boolean confirm(String message)
confirm
(message, getName
())
.
message
- The message to be displayed.
boolean
value of true
when the OK button is pressed. Otherwise,
it returns a value of false
.public void error(String message, String title)
message
- The message to be displayed.title
- The title of the error dialog.public void error(String message)
error
(message, getName
())
.
message
- The message to be displayed.public void inform(String message, String title)
message
- The message to be displayed.title
- The title of the information dialog.public void inform(String message)
inform
(message, getName
())
.
message
- The message to be displayed.public String prompt(String message, String initialText, String title)
message
- The prompt to be displayed.initialText
- The initial text to be displayed in the text input field.title
- The title of the input dialog.
null
value but possibly
zero-length. Otherwise, it returns a value of null
.public String prompt(String message, String initialText)
prompt
(message, initialText, getName
())
.
message
- The prompt to be displayed.initialText
- The initial text to be displayed in the text input field.
null
value but possibly
zero-length. Otherwise, it returns a value of null
.public String prompt(String message)
prompt
(message, "", getName
())
.
message
- The prompt to be displayed.
null
value but possibly
zero-length. Otherwise, it returns a value of null
.public boolean question(String message, String title)
message
- The question message to be displayed.title
- The title of the question message dialog.
boolean
value of true
when the Yes button is pressed. Otherwise,
it returns a value of false
.public boolean question(String message)
Yes
and
No buttons. Equivalent to
question
(message, getName
())
.
message
- The question message to be displayed.
boolean
value of true
when the Yes button is pressed. Otherwise,
it returns a value of false
.public void warning(String message, String title)
message
- The message to be displayed.title
- The title of the warning dialog.public void warning(String message)
warning
(message, getName
())
.
message
- The message to be displayed.public void printStackTrace(Throwable t, PrintWriter writer)
t
- The throwable whose backtrace is desired.writer
- The PrintWriter to use for output.public void printStackTrace(Throwable t)
t
- The throwable whose backtrace is desired.public void dumpStack(PrintWriter writer)
writer
- The PrintWriter to use for output.public void dumpStack()
public IPlugletMessageDialog getDialog()
IPlugletMessageDialog
implementation.
public void setDialog(IPlugletMessageDialog dialog)
IPlugletMessageDialog
implementation.
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.