|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgdl.ext.InfoTextBox
public class InfoTextBox
The InfoTextBox is a scrollable infopanel that can be displayed on a PCanvas: it can be closed like an 'in-canvas' window, collapsed or expanded. on initialisation, its size and transparancy is set. The InfoTextBox can be used to display text in a draggable panel on the canvas.
| Constructor Summary | |
|---|---|
InfoTextBox(GraphExplorerCanvas canvas,
edu.umd.cs.piccolo.PLayer mainLayer,
float posX,
float posY,
float boxWidth,
float boxHeight,
float headerHeight,
float lensTransparency,
java.awt.Color headerBackgroundColor,
java.lang.String mainText,
java.lang.String title)
|
|
| Method Summary | |
|---|---|
void |
collaps()
sets the infobox to a collapsed state which means that only the title bar is shown with small buttons to expand the box again. |
void |
expand()
expands the infobox |
boolean |
getCollapsedState()
|
void |
hide()
hides the infobox |
void |
scrollDown(double delta)
scrolls down by a given delta |
void |
scrollUp(double delta)
scrolls up by a given delta |
void |
setText(java.lang.String newText)
Updates the text of the infobox. |
void |
setTitle(java.lang.String newTitle)
Updated the title of the Infotextbox. |
void |
show()
shows up the infobox |
void |
updateSizes()
updates the size of all components to fit the size of the complete box |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InfoTextBox(GraphExplorerCanvas canvas,
edu.umd.cs.piccolo.PLayer mainLayer,
float posX,
float posY,
float boxWidth,
float boxHeight,
float headerHeight,
float lensTransparency,
java.awt.Color headerBackgroundColor,
java.lang.String mainText,
java.lang.String title)
canvas - the PCanvas you want the InfoPanel to be insertedmainLayer - the layer that should be used for the panelposX - the position on the canvas (x-coordinate)posY - the position on the canvas (Y-coordinate)boxWidth - the width of the complete infoboxboxHeight - the height of the complete infoboxheaderHeight - the height of the draggable infobox header, which can be compared to a window's titlebarlensTransparency - the transparancy of the infotextbox, between 0 and 1headerBackgroundColor - the backgroundcolor of the title bar (the text will be displayed in black, so choose a light colormainText - the text that is displayed in the main panel areatitle - the title of the infobox, displayed in the header| Method Detail |
|---|
public void updateSizes()
public void scrollUp(double delta)
delta - the amount to scrollpublic void scrollDown(double delta)
delta - the amount to scroll downpublic void hide()
public void show()
public void collaps()
public void expand()
public void setText(java.lang.String newText)
newText - the text that should be displayedpublic void setTitle(java.lang.String newTitle)
newTitle - the title that should be displayed in the panel's title barpublic boolean getCollapsedState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||