Package ptolemy.actor.lib.gui
Interface DisplayInterface
-
- All Known Implementing Classes:
DisplayJavaSE
public interface DisplayInterfaceInterface for implementing platform dependent parts of the display actor.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Ishwinder Singh
- Pt.AcceptedRating:
- Yellow (ishwinde)
- Pt.ProposedRating:
- Yellow (ishwinde)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanUp()Free up memory when closing.voiddisplay(java.lang.String tokenValue)Append the string value of the token to the text area on the screen.java.lang.ObjectgetTextArea()Return the object of the containing text area.voidinit(Display display)Set the number of rows for the text area.voidopenWindow()Open the display window if it has not been opened.voidplace(PortableContainer container)Specify the container in which the data should be displayed.voidremove()Remove the display from the current container, if there is one.voidsetColumns(int numberOfColumns)Set the desired number of columns of the textArea, if there is one.voidsetRows(int numberOfRows)Set the desired number of rows of the textArea, if there is one.voidsetTitle(java.lang.String stringValue)Set the title of the window.
-
-
-
Method Detail
-
cleanUp
void cleanUp()
Free up memory when closing.
-
display
void display(java.lang.String tokenValue)
Append the string value of the token to the text area on the screen. Each value is terminated with a newline character.- Parameters:
tokenValue- The string to be displayed
-
getTextArea
java.lang.Object getTextArea()
Return the object of the containing text area.- Returns:
- the text area.
-
init
void init(Display display) throws IllegalActionException, NameDuplicationException
Set the number of rows for the text area.- Parameters:
display- Object of the display actor.- Throws:
IllegalActionException- If the entity cannot be contained by the proposed container.NameDuplicationException- If the container already has an actor with this name.
-
openWindow
void openWindow() throws IllegalActionExceptionOpen the display window if it has not been opened.- Throws:
IllegalActionException- If there is a problem creating the effigy and tableau.
-
place
void place(PortableContainer container)
Specify the container in which the data should be displayed. An instance of JTextArea will be added to that container. This method needs to be called before the first call to initialize(). Otherwise, an instance of JTextArea will be placed in its own frame. The text area is also placed in its own frame if this method is called with a null argument. The background of the text area is set equal to that of the container (unless it is null).- Parameters:
container- The container into which to place the text area, or null to specify that there is no current container.
-
remove
void remove()
Remove the display from the current container, if there is one.
-
setColumns
void setColumns(int numberOfColumns) throws IllegalActionExceptionSet the desired number of columns of the textArea, if there is one.- Parameters:
numberOfColumns- The new value of the attribute.- Throws:
IllegalActionException- If the specified attribute is rowsDisplayed and its value is not positive.
-
setRows
void setRows(int numberOfRows) throws IllegalActionExceptionSet the desired number of rows of the textArea, if there is one.- Parameters:
numberOfRows- The new value of the attribute.- Throws:
IllegalActionException- If the specified attribute is rowsDisplayed and its value is not positive.
-
setTitle
void setTitle(java.lang.String stringValue) throws IllegalActionExceptionSet the title of the window.If the title parameter is set to the empty string, and the Display window has been rendered, then the title of the Display window will be updated to the value of the name parameter.
- Parameters:
stringValue- The title to be set.- Throws:
IllegalActionException- If the title cannot be set.
-
-