|
||||||||||
| 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
jview.JImageComponent
public class JImageComponent
A class that places an image that is completely loaded into a JComponent. The size of the component is retrieved from the image delivered to it.
| Nested Class Summary | |
|---|---|
static class |
JImageComponent.Display
Test the functionality. |
| 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 | |
|---|---|
private Image |
fits
The fits image to be displayed, rendered into a java image. |
| 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 | |
|---|---|
JImageComponent()
Calls the superconstructor with no arguments. |
|
JImageComponent(Image loaded)
Calls the superconstructor with no arguments and sets the fits image to display. |
|
| Method Summary | |
|---|---|
static BufferedImage |
createBufferedImage(Image img)
A general purpose method that converts non-buffered images into buffered images. |
Image |
getImage()
Returns the fits image displayed. |
Dimension |
getPreferredSize()
Returns the size of the image as the preferred size if it exists. |
void |
paintComponent(Graphics graph)
Draws the image by directly interfering with the paint method. |
void |
setImage(Image loaded)
Sets the fits image to display. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Image fits
| Constructor Detail |
|---|
public JImageComponent()
public JImageComponent(Image loaded)
| Method Detail |
|---|
public void setImage(Image loaded)
public Image getImage()
public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void paintComponent(Graphics graph)
paintComponent in class JComponentpublic static BufferedImage createBufferedImage(Image img)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||