Advertisement
jdalbey

Renderable.java

Oct 8th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.81 KB | None | 0 0
  1. /**
  2.  * Renderable classes can be "rendered", either by a GUI or a text console.
  3.  * See the Swing Tutorial on JTable for more info about cell rendering.
  4.  * @author J. Dalbey
  5.  */
  6. public interface Renderable
  7. {
  8.     /**
  9.      * Return a printable representation of this item that could be used
  10.      * in a console user interface.  If this item is empty, this method
  11.      * must return an appropriate number of blanks.
  12.      * @return String representing this item.
  13.      */
  14.     String getText();
  15.     /**
  16.      * Return a String representing a graphical depiction of this item that could be used
  17.      * in a Graphical user interface.  Most often this string is the name of a file
  18.      * containing the image to be associated with an item.
  19.      * @return String representing this item.
  20.      */
  21.     String toString();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement