VeaR/JEllipse

pl.krakow.cmuj.bioinformatics.jellipse
Class Surface

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 pl.krakow.cmuj.bioinformatics.jellipse.Surface
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
LnRvsVPlot, RamachandranMap

public abstract class Surface
extends javax.swing.JPanel
implements java.awt.print.Printable

General-purpose drawing (plotting area).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 java.lang.Object AntiAlias
           
private  int bih
           
 java.awt.image.BufferedImage bimg
           
private  int biw
           
private  boolean clearOnce
           
 boolean clearSurface
           
 java.awt.AlphaComposite composite
           
 boolean dontThread
           
private  long frame
           
 int imageType
           
(package private)  byte[] lut1Arr
           
(package private)  byte[] lut2Arr
           
(package private)  byte[] lut4Arr
           
 java.lang.String name
           
private  long orig
           
private  boolean outputPerf
           
private  boolean perfMonitor
           
 java.lang.Object Rendering
           
protected  long sleepAmount
           
private  long start
           
 java.awt.Paint texture
           
private  boolean toBeInitialized
           
private  java.awt.Toolkit toolkit
           
 
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.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Surface()
           
 
Method Summary
private  java.awt.image.BufferedImage createBinaryImage(int w, int h, int pixelBits)
           
 java.awt.image.BufferedImage createBufferedImage(java.awt.Graphics2D g2, int w, int h, int imgType)
           
 java.awt.Graphics2D createGraphics2D(int width, int height, java.awt.image.BufferedImage bi, java.awt.Graphics g)
           
private  java.awt.image.BufferedImage createSGISurface(int w, int h, int pixelBits)
           
 int getImageType()
           
 long getSleepAmount()
           
 void paint(java.awt.Graphics g)
           
 void paintImmediately(int x, int y, int w, int h)
          It's possible to turn off double-buffering for just the repaint calls invoked directly on the non double buffered component.
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pi)
           
abstract  void render(int w, int h, java.awt.Graphics2D g2)
           
 void setAntiAlias(boolean aa)
           
 void setComposite(boolean cp)
           
 void setImageType(int imgType)
           
 void setMonitor(boolean pm)
           
 void setRendering(boolean rd)
           
 void setSleepAmount(long amount)
           
 void setTexture(java.lang.Object obj)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AntiAlias

public java.lang.Object AntiAlias

Rendering

public java.lang.Object Rendering

composite

public java.awt.AlphaComposite composite

texture

public java.awt.Paint texture

bimg

public java.awt.image.BufferedImage bimg

imageType

public int imageType

name

public java.lang.String name

clearSurface

public boolean clearSurface

dontThread

public boolean dontThread

sleepAmount

protected long sleepAmount

orig

private long orig

start

private long start

frame

private long frame

toolkit

private java.awt.Toolkit toolkit

perfMonitor

private boolean perfMonitor

outputPerf

private boolean outputPerf

biw

private int biw

bih

private int bih

clearOnce

private boolean clearOnce

toBeInitialized

private boolean toBeInitialized

lut1Arr

byte[] lut1Arr

lut2Arr

byte[] lut2Arr

lut4Arr

byte[] lut4Arr
Constructor Detail

Surface

public Surface()
Method Detail

getImageType

public int getImageType()

setImageType

public void setImageType(int imgType)

setAntiAlias

public void setAntiAlias(boolean aa)

setRendering

public void setRendering(boolean rd)

setTexture

public void setTexture(java.lang.Object obj)

setComposite

public void setComposite(boolean cp)

setMonitor

public void setMonitor(boolean pm)

setSleepAmount

public void setSleepAmount(long amount)

getSleepAmount

public long getSleepAmount()

createBufferedImage

public java.awt.image.BufferedImage createBufferedImage(java.awt.Graphics2D g2,
                                                        int w,
                                                        int h,
                                                        int imgType)

createBinaryImage

private java.awt.image.BufferedImage createBinaryImage(int w,
                                                       int h,
                                                       int pixelBits)

createSGISurface

private java.awt.image.BufferedImage createSGISurface(int w,
                                                      int h,
                                                      int pixelBits)

createGraphics2D

public java.awt.Graphics2D createGraphics2D(int width,
                                            int height,
                                            java.awt.image.BufferedImage bi,
                                            java.awt.Graphics g)

render

public abstract void render(int w,
                            int h,
                            java.awt.Graphics2D g2)

paintImmediately

public void paintImmediately(int x,
                             int y,
                             int w,
                             int h)
It's possible to turn off double-buffering for just the repaint calls invoked directly on the non double buffered component. This can be done by overriding paintImmediately() (which is called as a result of repaint) and getting the current RepaintManager and turning off double buffering in the RepaintManager before calling super.paintImmediately(g).

Overrides:
paintImmediately in class javax.swing.JComponent

paint

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

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int pi)
          throws java.awt.print.PrinterException
Specified by:
print in interface java.awt.print.Printable
Throws:
java.awt.print.PrinterException

VeaR/JEllipse