|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jadex.micro.examples.mandelbrot.DisplayPanel
public class DisplayPanel
Panel for displaying calculated results.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected boolean |
calculating
Flag indicating that a calculation is in progress. |
protected Color[] |
colors
The colors for drawing. |
protected AreaData |
data
The latest area data used for determining original coordinates of painted regions. |
protected Point |
enddrag
End point for dragging (if any). |
static String |
HELPTEXT
The help text. |
protected Image |
image
The current image derived from the results. |
protected Point |
point
The current selection start point (if any). |
protected Map |
progressdata
Progress data objects, available only when calculating (progress data -> percent finished). |
protected Timer |
progressupdate
Progress update timer. |
protected IServiceProvider |
provider
The service provider. |
protected Rectangle |
range
The current selection range (if any). |
protected Point |
startdrag
Start point for dragging (if any). |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
DisplayPanel(IServiceProvider provider)
Create a new display panel. |
|
| Method Summary | |
|---|---|
void |
addProgress(ProgressData progress)
Display intermediate calculation results. |
protected void |
calcArea(double x1,
double x2,
double y1,
double y2,
int sizex,
int sizey)
Calculate the given area. |
protected void |
calcDefaultImage()
Set display coordinates to default values. |
protected void |
dragImage()
Drag the image according to current drag settings. |
protected Rectangle |
getInnerBounds(boolean scrollarea)
Get the bounds with respect to insets (if any). |
Dimension |
getMinimumSize()
Get the desired size of the panel. |
Dimension |
getPreferredSize()
Get the desired size of the panel. |
protected void |
paintComponent(Graphics g)
Paint the results. |
protected Rectangle |
scaleToFit(Rectangle bounds,
int iwidth,
int iheight)
Calculate draw area for image. |
void |
setColorScheme(Color[] scheme)
Set the color scheme. |
void |
setResults(AreaData data)
Set new results. |
protected void |
zoomImage(int x,
int y,
double factor)
Zoom into the given location by the given factor. |
protected void |
zoomIntoRange()
Zoom into the selected range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String HELPTEXT
protected IServiceProvider provider
protected Color[] colors
protected AreaData data
protected Image image
protected Point point
protected Rectangle range
protected boolean calculating
protected Map progressdata
protected Timer progressupdate
protected Point startdrag
protected Point enddrag
| Constructor Detail |
|---|
public DisplayPanel(IServiceProvider provider)
| Method Detail |
|---|
public void setResults(AreaData data)
public void addProgress(ProgressData progress)
protected void paintComponent(Graphics g)
paintComponent in class JComponent
protected Rectangle scaleToFit(Rectangle bounds,
int iwidth,
int iheight)
protected Rectangle getInnerBounds(boolean scrollarea)
scrollarea - True when inner bounds of scroll area instead of visible window space should be considered.public Dimension getMinimumSize()
getMinimumSize in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void setColorScheme(Color[] scheme)
protected void dragImage()
protected void zoomImage(int x,
int y,
double factor)
protected void calcDefaultImage()
protected void zoomIntoRange()
protected void calcArea(double x1,
double x2,
double y1,
double y2,
int sizex,
int sizey)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||