public interface DetailViewer
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyedItem(java.lang.String name,
boolean value)
Adds a key-value paired information item for boolean data.
|
void |
addKeyedItem(java.lang.String name,
double value)
Adds a key-value paired information item for double data.
|
void |
addKeyedItem(java.lang.String name,
float value)
Adds a key-value paired information item for float data.
|
void |
addKeyedItem(java.lang.String name,
int value)
Adds a key-value paired information item for int data.
|
void |
addKeyedItem(java.lang.String name,
long value)
Adds a key-value paired information item for long data.
|
void |
addKeyedItem(java.lang.String name,
java.lang.Object value)
Adds a key-value paired information item for Object data.
|
void |
addKeyedItem(java.lang.String name,
java.lang.String value)
Adds a key-value paired information item for string data.
|
void |
addPane(java.lang.String title,
java.awt.Component comp)
Adds a component for optional display within this viewer.
|
void |
addPane(java.lang.String title,
ComponentMaker maker)
Adds a deferred-construction component for optional display within
this viewer.
|
void |
addScalingPane(java.lang.String title,
ComponentMaker maker)
Adds a new deferred-construction component which will
draw itself at a size appropriate to the size of its container.
|
void |
addSeparator()
Adds a visible separator to the display.
|
void |
addSpace()
Adds a small amount of space to the overview display.
|
void |
addSubHead(java.lang.String text)
Adds a subheading to the display.
|
void |
addText(java.lang.String text)
Adds unformatted text to the display.
|
void |
addTitle(java.lang.String title)
Adds a top-level title to the display.
|
void |
logError(java.lang.Throwable err)
Logs an error in supplying data in some visible fashion.
|
void addTitle(java.lang.String title)
title - title textvoid addSubHead(java.lang.String text)
text - subheading textvoid addKeyedItem(java.lang.String name,
java.lang.String value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
java.lang.Object value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
double value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
float value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
long value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
int value)
name - key textvalue - valuevoid addKeyedItem(java.lang.String name,
boolean value)
name - key textvalue - valuevoid logError(java.lang.Throwable err)
err - errorvoid addSeparator()
void addSpace()
void addText(java.lang.String text)
text - textvoid addPane(java.lang.String title,
java.awt.Component comp)
title - title of the new componentcomp - componentvoid addPane(java.lang.String title,
ComponentMaker maker)
title - title of the new componentmaker - component deferred factoryvoid addScalingPane(java.lang.String title,
ComponentMaker maker)
protected void paintComponent( Graphics g ) {
super.paintComponent( g );
doScaledPainting( getSize() );
}
or, perhaps for efficiency, more like this:
private Dimension lastSize;
protected void paintComponent( Graphics g ) {
super.paintComponent( g );
Dimension size = getSize();
if ( ! size.equals( lastSize ) ) {
setPreferredSize( size );
reconfigureComponentToSize( size );
}
doPainting();
}
title - title of the new componentmaker - component deferred factoryCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.