org.minueto.window
Class MinuetoPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.minueto.window.MinuetoPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, MinuetoDrawingSurface, MinuetoWindow

public class MinuetoPanel
extends javax.swing.JPanel
implements MinuetoWindow

The MinuetoPanel class allows you to create a Panel which can be inserted inside your Swing/AWT application. This panel is your main drawing surface (your canvas). It is also a JPanel. This allows for easy swing integration by adding it like any other control. The only difference is that you must pass the width and height for your canvas size first.

This class is also implements MinuetoWindow. As such, all the drawing functionnality is provided as well.

If you were using the old version of this class, minimal changes should be needed: You just need to add it like a regular JPanel and calling enable is no longer needed. Just call setVisible(true).

When a MinuetoPanel is created, it is invisible. The setVisible method must be used to show the window (make it visible).

Minueto draws to the screen using a double-buffering strategy. In other words, there are two drawing surfaces : your window itself and an off screen surface. All your drawing occurs on the off screen surface. The content of the off screen buffer is drawn to the screen when the render method is invoked.

As Minueto does complex Graphical work, it isn't really meant to interact with Swing that nicely. While the MinuetoPanel takes care of actually allowing you to draw in an accelerated fashion while contained within Swing components. The Panel itself doesn't know about Swing. Therefore, it is drawn completely on top of any other swing component. Thus, windows or buttons that are in front of the MinuetoPanel will be drawn behind it.

Since:
1.1
See Also:
MinuetoBaseWindow, MinuetoWindow, MinuetoImage, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
MinuetoPanel(int width, int height)
           
 
Method Summary
 void addFocusListener(java.awt.event.FocusListener arg0)
           
 void addKeyListener(java.awt.event.KeyListener arg0)
           
 void addMouseListener(java.awt.event.MouseListener arg0)
           
 void addMouseMotionListener(java.awt.event.MouseMotionListener arg0)
           
 void addMouseWheelListener(java.awt.event.MouseWheelListener arg0)
           
 void clear()
          Clears the contents of the Drawing Surface.
 void clear(MinuetoColor color)
          Erases the contents from the Drawing Surface.
 void close()
          Closing a MinuetoPanel doesn't really make too much sense.
 void draw(MinuetoImage image, int x, int y)
          Draw another MinuetoImage on this MinuetoDrawingSurface (thus compositing them).
 void drawLine(MinuetoColor color, int xStart, int yStart, int xStop, int yStop)
          Draw a line of the specified color from the start point to the end point.
 double getFrameRate()
          Returns the number of frame renders per second.
 int getHeight()
          Return the height of the image.
 int getPositionX()
          Returns the top-left X screen location of the MinuetoWindow drawing surface
 int getPositionY()
          Returns the top-left Y screen location of the MinuetoWindow drawing surface
 java.awt.Dimension getPreferredSize()
           
 int getWidth()
          Return the width of the image.
 boolean isClosed()
          Returns if the MinuetoWindow is was closed.
 boolean isVisible()
          Returns if the MinuetoWindow is visible or not.
 void paint(java.awt.Graphics arg0)
           
 void registerFocusHandler(MinuetoFocusHandler handler, MinuetoEventQueue queue)
          Assign a focus handler to the MinuetoWindow to process focus events.
 void registerKeyboardHandler(MinuetoKeyboardHandler handler, MinuetoEventQueue queue)
          Assign a keyboard handler to the MinuetoWindow to process keyboard input.
 void registerMouseHandler(MinuetoMouseHandler handler, MinuetoEventQueue queue)
          Assign a mouse handler to the MinuetoWindow to process mouse input.
 void registerMouseWheelHandler(MinuetoMouseWheelHandler handler, MinuetoEventQueue queue)
          Assign a mousewheel handler to the MinuetoWindow to process mouse wheel input.
 void registerWindowHandler(MinuetoWindowHandler handler, MinuetoEventQueue queue)
          Assign a window handler to the MinuetoWindow to process window input.
 void removeFocusListener(java.awt.event.FocusListener arg0)
           
 void removeKeyListener(java.awt.event.KeyListener arg0)
           
 void removeMouseListener(java.awt.event.MouseListener arg0)
           
 void removeMouseMotionListener(java.awt.event.MouseMotionListener arg0)
           
 void removeMouseWheelListener(java.awt.event.MouseWheelListener arg0)
           
 void render()
          Draws the content of the backbuffer onto the window.
 void save(java.lang.String filename)
          Saves the content of the MinuetoDrawingSurface to a PNG file.
 void setCursorVisible(boolean value)
          Shows or hides the mouse cursor.
 void setMaxFrameRate(double value)
          Caps the number of frames which can be rendered (display) per second.
 void setPixel(int x, int y, MinuetoColor color)
          Change the color of pxel at location X,y.
 void setSize(java.awt.Dimension dimension)
           
 void setTitle(java.lang.String title)
          Change the title of the window.
 void setVisible(boolean arg0)
          Shows or hides the MinuetoWindow.
 void unregisterFocusHandler(MinuetoFocusHandler handler, MinuetoEventQueue queue)
          Removes a focus handler from the MinuetoWindow.
 void unregisterKeyboardHandler(MinuetoKeyboardHandler handler, MinuetoEventQueue queue)
          Removes a keyboard handler from the MinuetoWindow.
 void unregisterMouseHandler(MinuetoMouseHandler handler, MinuetoEventQueue queue)
          Removes a mouse handler from the MinuetoWindow.
 void unregisterMouseWheelHandler(MinuetoMouseWheelHandler handler, MinuetoEventQueue queue)
          Removes a mouse wheel handler from the MinuetoWindow.
 void unregisterWindowHandler(MinuetoWindowHandler handler, MinuetoEventQueue queue)
          Removes a window handler from the MinuetoWindow.
 void update(java.awt.Graphics arg0)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MinuetoPanel

public MinuetoPanel(int width,
                    int height)
Method Detail

clear

public void clear()
Description copied from interface: MinuetoDrawingSurface
Clears the contents of the Drawing Surface. The color that remains depends on the JVM.

Specified by:
clear in interface MinuetoDrawingSurface

clear

public void clear(MinuetoColor color)
Description copied from interface: MinuetoDrawingSurface
Erases the contents from the Drawing Surface. The color of the cleared surface is specified as a parameter.

Specified by:
clear in interface MinuetoDrawingSurface
Parameters:
color - MinuetoColor of the cleared buffer.

close

public void close()
Closing a MinuetoPanel doesn't really make too much sense. In this case we'll use it as an Alias for setVisible(false)

Specified by:
close in interface MinuetoWindow

draw

public void draw(MinuetoImage image,
                 int x,
                 int y)
Description copied from interface: MinuetoDrawingSurface
Draw another MinuetoImage on this MinuetoDrawingSurface (thus compositing them).

Specified by:
draw in interface MinuetoDrawingSurface
Parameters:
image - MinuetoImage that we will draw on our image.
x - int denoting where we should start drawing on the x axis.
y - int denothing where we should start drawing on the y axis.

drawLine

public void drawLine(MinuetoColor color,
                     int xStart,
                     int yStart,
                     int xStop,
                     int yStop)
Description copied from interface: MinuetoDrawingSurface
Draw a line of the specified color from the start point to the end point.

Specified by:
drawLine in interface MinuetoDrawingSurface
Parameters:
color - MinuetoColor denoting the color of the line.
xStart - int denoting the X value of the start point.
yStart - int denoting the Y value of the start point.
xStop - int denoting the X value of the end point.
yStop - int denoting the Y value of the end point.

getFrameRate

public double getFrameRate()
Description copied from interface: MinuetoWindow
Returns the number of frame renders per second. This is value is updated every 50 frames.

Specified by:
getFrameRate in interface MinuetoWindow
Returns:
int denoting the number of frames drawn per second.

getHeight

public int getHeight()
Description copied from interface: MinuetoDrawingSurface
Return the height of the image.

Specified by:
getHeight in interface MinuetoDrawingSurface
Overrides:
getHeight in class javax.swing.JComponent
Returns:
int denoting the height of the image.

getWidth

public int getWidth()
Description copied from interface: MinuetoDrawingSurface
Return the width of the image.

Specified by:
getWidth in interface MinuetoDrawingSurface
Overrides:
getWidth in class javax.swing.JComponent
Returns:
int denoting the width of the image.

registerKeyboardHandler

public void registerKeyboardHandler(MinuetoKeyboardHandler handler,
                                    MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Assign a keyboard handler to the MinuetoWindow to process keyboard input. An unlimited number of keyboard handlers can be registered with a window, but too many handlers may slow the application (because of the large number of events produced).

Specified by:
registerKeyboardHandler in interface MinuetoWindow
Parameters:
handler - MinuetoKeyboardHandler to register with the MinuetoEventQueue.
queue - MinuetoEventQueue that will store events..

registerMouseHandler

public void registerMouseHandler(MinuetoMouseHandler handler,
                                 MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Assign a mouse handler to the MinuetoWindow to process mouse input. An unlimited number of mouse handlers can be registered with a window, but too many handlers may slow the application (because of the large number of events produced).

Specified by:
registerMouseHandler in interface MinuetoWindow
Parameters:
handler - MinuetoMouseHandler to register with the MinuetoWindow.
queue - MinuetoEventQueue that will store events.

registerMouseWheelHandler

public void registerMouseWheelHandler(MinuetoMouseWheelHandler handler,
                                      MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Assign a mousewheel handler to the MinuetoWindow to process mouse wheel input. An unlimited number of mouse wheel handlers can be registered with a window, but too many handlers may slow the application (because of the large number of events produced).

Specified by:
registerMouseWheelHandler in interface MinuetoWindow
Parameters:
handler - MinuetoMouseWheelHandler to register with the MinuetoWindow.
queue - MinuetoEventQueue that will store events.

registerWindowHandler

public void registerWindowHandler(MinuetoWindowHandler handler,
                                  MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Assign a window handler to the MinuetoWindow to process window input. An unlimited number of window handlers can be registered with a window, but too many handlers may slow the application (because of the large number of events produced).

Specified by:
registerWindowHandler in interface MinuetoWindow
Parameters:
handler - MinuetoWindowHandler to register with the MinuetoWindow.
queue - MinuetoEventQueue that will store events.

registerFocusHandler

public void registerFocusHandler(MinuetoFocusHandler handler,
                                 MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Assign a focus handler to the MinuetoWindow to process focus events. An unlimited number of window handlers can be registered with a window, but too many handlers may slow the application (because of the large number of events produced).

Specified by:
registerFocusHandler in interface MinuetoWindow
Parameters:
handler - MinuetoFocusHandler to register with the MinuetoWindow.
queue - MinuetoEventQueue that will store events.

render

public void render()
Description copied from interface: MinuetoWindow
Draws the content of the backbuffer onto the window. The content of the backbuffer is lost after this call.

Specified by:
render in interface MinuetoWindow

setCursorVisible

public void setCursorVisible(boolean value)
Description copied from interface: MinuetoWindow
Shows or hides the mouse cursor.

Specified by:
setCursorVisible in interface MinuetoWindow
Parameters:
value - boolean denoting if the window should be visible or not.

setMaxFrameRate

public void setMaxFrameRate(double value)
Description copied from interface: MinuetoWindow
Caps the number of frames which can be rendered (display) per second. The efficienty of the cap depends on the accuracy of the system timer. Calling this method with a value of 0 will disable the cap.

Specified by:
setMaxFrameRate in interface MinuetoWindow
Parameters:
value - double denoting the desired number of frames to be displayed per second.

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: MinuetoWindow
Change the title of the window.

Specified by:
setTitle in interface MinuetoWindow
Parameters:
title - String identifying the desired title of the screen.

isVisible

public boolean isVisible()
Description copied from interface: MinuetoWindow
Returns if the MinuetoWindow is visible or not.

Specified by:
isVisible in interface MinuetoWindow
Overrides:
isVisible in class java.awt.Component
Returns:
boolean if Window is visible or not

setVisible

public void setVisible(boolean arg0)
Description copied from interface: MinuetoWindow
Shows or hides the MinuetoWindow.

Specified by:
setVisible in interface MinuetoWindow
Overrides:
setVisible in class javax.swing.JComponent
Parameters:
arg0 - boolean denoting if the window should be visible or not.

unregisterKeyboardHandler

public void unregisterKeyboardHandler(MinuetoKeyboardHandler handler,
                                      MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Removes a keyboard handler from the MinuetoWindow. Note that both the correct handler and queue must be given to unregister the handler.

Specified by:
unregisterKeyboardHandler in interface MinuetoWindow
Parameters:
handler - MinuetoKeyboardHandler to unregister with the MinuetoWindow.
queue - MinuetoEventQueue that stored the events.

unregisterMouseHandler

public void unregisterMouseHandler(MinuetoMouseHandler handler,
                                   MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Removes a mouse handler from the MinuetoWindow. Note that both the correct handler and queue must be given to unregister the handler.

Specified by:
unregisterMouseHandler in interface MinuetoWindow
Parameters:
handler - MinuetoMouseHandler to unregister with the MinuetoWindow.
queue - MinuetoEventQueue that stored the events.

unregisterMouseWheelHandler

public void unregisterMouseWheelHandler(MinuetoMouseWheelHandler handler,
                                        MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Removes a mouse wheel handler from the MinuetoWindow. Note that both the correct handler and queue must be given to unregister the handler.

Specified by:
unregisterMouseWheelHandler in interface MinuetoWindow
Parameters:
handler - MinuetoMouseWheelHandler to unregister with the MinuetoWindow.
queue - MinuetoEventQueue that stored the events.

unregisterWindowHandler

public void unregisterWindowHandler(MinuetoWindowHandler handler,
                                    MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Removes a window handler from the MinuetoWindow. Note that both the correct handler and queue must be given to unregister the handler.

Specified by:
unregisterWindowHandler in interface MinuetoWindow
Parameters:
handler - MinuetoWindowHandler to unregister with the MinuetoWindow.
queue - MinuetoEventQueue that stored the events.

unregisterFocusHandler

public void unregisterFocusHandler(MinuetoFocusHandler handler,
                                   MinuetoEventQueue queue)
Description copied from interface: MinuetoWindow
Removes a focus handler from the MinuetoWindow. Note that both the correct handler and queue must be given to unregister the handler.

Specified by:
unregisterFocusHandler in interface MinuetoWindow
Parameters:
handler - MinuetoFocusHandler to unregister with the MinuetoWindow.
queue - MinuetoEventQueue that stored the events.

addFocusListener

public void addFocusListener(java.awt.event.FocusListener arg0)
Overrides:
addFocusListener in class java.awt.Component

addKeyListener

public void addKeyListener(java.awt.event.KeyListener arg0)
Overrides:
addKeyListener in class java.awt.Component

addMouseListener

public void addMouseListener(java.awt.event.MouseListener arg0)
Overrides:
addMouseListener in class java.awt.Component

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener arg0)
Overrides:
addMouseMotionListener in class java.awt.Component

addMouseWheelListener

public void addMouseWheelListener(java.awt.event.MouseWheelListener arg0)
Overrides:
addMouseWheelListener in class java.awt.Component

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener arg0)
Overrides:
removeFocusListener in class java.awt.Component

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener arg0)
Overrides:
removeKeyListener in class java.awt.Component

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener arg0)
Overrides:
removeMouseListener in class java.awt.Component

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener arg0)
Overrides:
removeMouseMotionListener in class java.awt.Component

removeMouseWheelListener

public void removeMouseWheelListener(java.awt.event.MouseWheelListener arg0)
Overrides:
removeMouseWheelListener in class java.awt.Component

save

public void save(java.lang.String filename)
          throws MinuetoFileException
Description copied from interface: MinuetoDrawingSurface
Saves the content of the MinuetoDrawingSurface to a PNG file. Since this method requires File I/O, it is somewhat slow. However, this method can be used as a debugging tool.

Specified by:
save in interface MinuetoDrawingSurface
Parameters:
filename - String indicating the name of the PNG file.
Throws:
MinuetoFileException

setPixel

public void setPixel(int x,
                     int y,
                     MinuetoColor color)
Description copied from interface: MinuetoDrawingSurface
Change the color of pxel at location X,y.

This uses the drawLine function to be faster than a direct raw data setPxel, though it should be used with caution as it is still slower than drawing a completed image to the drawing surface.

Specified by:
setPixel in interface MinuetoDrawingSurface
Parameters:
x - int denoting which pxel on the X axis should be colored.
y - int denoting which pxel on the y axis should be colored.
color - MinuetoColor denoting the new color for pxel x,y.

getPositionX

public int getPositionX()
Description copied from interface: MinuetoWindow
Returns the top-left X screen location of the MinuetoWindow drawing surface

Specified by:
getPositionX in interface MinuetoWindow
Returns:
int denoting the x position of the drawing surface

getPositionY

public int getPositionY()
Description copied from interface: MinuetoWindow
Returns the top-left Y screen location of the MinuetoWindow drawing surface

Specified by:
getPositionY in interface MinuetoWindow
Returns:
int denoting the y position of the drawing surface

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

setSize

public void setSize(java.awt.Dimension dimension)
Overrides:
setSize in class java.awt.Component

paint

public void paint(java.awt.Graphics arg0)
Overrides:
paint in class javax.swing.JComponent

update

public void update(java.awt.Graphics arg0)
Overrides:
update in class javax.swing.JComponent

isClosed

public boolean isClosed()
Description copied from interface: MinuetoWindow
Returns if the MinuetoWindow is was closed.

Specified by:
isClosed in interface MinuetoWindow
Returns:
boolean if Window was closed or not