com.metsci.glimpse.gl.layout
Class GLLayoutPainter

java.lang.Object
  extended by com.metsci.glimpse.gl.GLSimpleListenerAbstract
      extended by com.metsci.glimpse.gl.layout.GLLayoutPainter
All Implemented Interfaces:
GLSimpleListener, net.miginfocom.layout.ComponentWrapper, net.miginfocom.layout.ContainerWrapper

public class GLLayoutPainter
extends GLSimpleListenerAbstract
implements net.miginfocom.layout.ComponentWrapper, net.miginfocom.layout.ContainerWrapper

Don't forget the "bottomtotop" layout constraint for MiG, or things will be upside-down from what you probably expect.

Author:
osborn

Nested Class Summary
 
Nested classes/interfaces inherited from class com.metsci.glimpse.gl.GLSimpleListenerAbstract
GLSimpleListenerAbstract.GLSimpleListenerBridge
 
Field Summary
static int DEFAULT
           
static int DEFAULT_HEIGHT
           
static int DEFAULT_WIDTH
           
 java.util.concurrent.locks.ReentrantLock lock
           
 
Fields inherited from interface net.miginfocom.layout.ComponentWrapper
TYPE_BUTTON, TYPE_CHECK_BOX, TYPE_COMBO_BOX, TYPE_CONTAINER, TYPE_IMAGE, TYPE_LABEL, TYPE_LIST, TYPE_PANEL, TYPE_PROGRESS_BAR, TYPE_SCROLL_BAR, TYPE_SCROLL_PANE, TYPE_SEPARATOR, TYPE_SLIDER, TYPE_SPINNER, TYPE_TABLE, TYPE_TEXT_AREA, TYPE_TEXT_FIELD, TYPE_TREE, TYPE_UNKNOWN, TYPE_UNSET
 
Constructor Summary
GLLayoutPainter()
           
GLLayoutPainter(GLLayoutPainter parent)
           
 
Method Summary
 void addLayoutPainter(GLLayoutPainter layout)
           
 void addLayoutPainter(GLLayoutPainter layout, GLDisplayCallback c)
           
 void addLayoutUpdateListener(GLLayoutUpdateListener listener)
           
 void addSimpleListener(GLSimpleListener listener)
           
 void addSimpleListener(GLSimpleListener listener, GLDisplayCallback c)
           
 void display(javax.media.opengl.GLContext context)
           
 void displayChanged(javax.media.opengl.GLContext context, boolean modeChanged, boolean deviceChanged)
           
 void dispose(javax.media.opengl.GLContext context)
          Free GPU and CPU memory associated with this this context.
 int getBaseline(int width, int height)
           
 java.awt.Rectangle getBounds()
           
 GLLayoutPainter getComponent()
           
 int getComponentCount()
           
 net.miginfocom.layout.ComponentWrapper[] getComponents()
           
 int getComponetType(boolean disregardScrollPane)
           
 int getHeight()
           
 int getHorizontalScreenDPI()
           
 GLLayoutManger getLayout()
           
 java.lang.Object getLayoutData()
           
 int getLayoutHashCode()
           
 java.lang.String getLinkId()
           
 int getMaximumHeight(int wHint)
           
 int getMaximumWidth(int hHint)
           
 int getMinimumHeight(int wHint)
           
 int getMinimumWidth(int hHint)
           
 java.lang.String getName()
           
 GLLayoutPainter getParent()
           
 float getPixelUnitFactor(boolean isHor)
           
 int getPreferredHeight(int wHint)
           
 int getPreferredWidth(int hHint)
           
 int getScreenHeight()
           
 int getScreenLocationX()
           
 int getScreenLocationY()
           
 int getScreenWidth()
           
 int getVerticalScreenDPI()
           
 int[] getVisualPadding()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 boolean hasBaseline()
           
 void init(javax.media.opengl.GLContext context)
           
 void invalidate()
          Marks the layout as needing to be recalculated after user changes.
 void invalidateLayout()
           
 boolean isHovered()
           
 boolean isLeftToRight()
           
 boolean isPadded()
           
 boolean isVisible()
           
 void paintDebugCell(int x, int y, int width, int height)
           
 void paintDebugOutline()
           
 void removeLayoutPainter(GLLayoutPainter layout)
           
 void removeSimpleListener(GLSimpleListener layout)
           
 void reshape(javax.media.opengl.GLContext context, int x, int y, int width, int height)
           
 void setBounds(int x, int y, int width, int height)
           
 void setHovered(boolean value)
           
 void setLayout(GLLayoutManger manager)
           
 void setLayoutData(java.lang.Object layoutData)
           
 void setName(java.lang.String name)
           
 void setPadding(boolean v)
           
 
Methods inherited from class com.metsci.glimpse.gl.GLSimpleListenerAbstract
asJoglListener, getInfo, isDisposed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

public java.util.concurrent.locks.ReentrantLock lock

DEFAULT

public static final int DEFAULT
See Also:
Constant Field Values

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
See Also:
Constant Field Values

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
See Also:
Constant Field Values
Constructor Detail

GLLayoutPainter

public GLLayoutPainter(GLLayoutPainter parent)

GLLayoutPainter

public GLLayoutPainter()
Method Detail

addLayoutUpdateListener

public void addLayoutUpdateListener(GLLayoutUpdateListener listener)

removeLayoutPainter

public void removeLayoutPainter(GLLayoutPainter layout)

removeSimpleListener

public void removeSimpleListener(GLSimpleListener layout)

addLayoutPainter

public void addLayoutPainter(GLLayoutPainter layout)

addLayoutPainter

public void addLayoutPainter(GLLayoutPainter layout,
                             GLDisplayCallback c)

addSimpleListener

public void addSimpleListener(GLSimpleListener listener)

addSimpleListener

public void addSimpleListener(GLSimpleListener listener,
                              GLDisplayCallback c)

dispose

public void dispose(javax.media.opengl.GLContext context)
Description copied from interface: GLSimpleListener
Free GPU and CPU memory associated with this this context.

Specified by:
dispose in interface GLSimpleListener
Overrides:
dispose in class GLSimpleListenerAbstract

init

public void init(javax.media.opengl.GLContext context)
Specified by:
init in interface GLSimpleListener

display

public void display(javax.media.opengl.GLContext context)
Specified by:
display in interface GLSimpleListener

reshape

public void reshape(javax.media.opengl.GLContext context,
                    int x,
                    int y,
                    int width,
                    int height)
Specified by:
reshape in interface GLSimpleListener

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Specified by:
setBounds in interface net.miginfocom.layout.ComponentWrapper

displayChanged

public void displayChanged(javax.media.opengl.GLContext context,
                           boolean modeChanged,
                           boolean deviceChanged)
Specified by:
displayChanged in interface GLSimpleListener

invalidate

public void invalidate()
Marks the layout as needing to be recalculated after user changes.


invalidateLayout

public void invalidateLayout()

getBounds

public java.awt.Rectangle getBounds()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

setHovered

public void setHovered(boolean value)

isHovered

public boolean isHovered()

getLayoutData

public java.lang.Object getLayoutData()

setLayout

public void setLayout(GLLayoutManger manager)

setLayoutData

public void setLayoutData(java.lang.Object layoutData)

getComponent

public GLLayoutPainter getComponent()
Specified by:
getComponent in interface net.miginfocom.layout.ComponentWrapper

getX

public int getX()
Specified by:
getX in interface net.miginfocom.layout.ComponentWrapper

getY

public int getY()
Specified by:
getY in interface net.miginfocom.layout.ComponentWrapper

getWidth

public int getWidth()
Specified by:
getWidth in interface net.miginfocom.layout.ComponentWrapper

getHeight

public int getHeight()
Specified by:
getHeight in interface net.miginfocom.layout.ComponentWrapper

getMinimumWidth

public int getMinimumWidth(int hHint)
Specified by:
getMinimumWidth in interface net.miginfocom.layout.ComponentWrapper

getMinimumHeight

public int getMinimumHeight(int wHint)
Specified by:
getMinimumHeight in interface net.miginfocom.layout.ComponentWrapper

getPreferredWidth

public int getPreferredWidth(int hHint)
Specified by:
getPreferredWidth in interface net.miginfocom.layout.ComponentWrapper

getPreferredHeight

public int getPreferredHeight(int wHint)
Specified by:
getPreferredHeight in interface net.miginfocom.layout.ComponentWrapper

getMaximumWidth

public int getMaximumWidth(int hHint)
Specified by:
getMaximumWidth in interface net.miginfocom.layout.ComponentWrapper

getMaximumHeight

public int getMaximumHeight(int wHint)
Specified by:
getMaximumHeight in interface net.miginfocom.layout.ComponentWrapper

isVisible

public boolean isVisible()
Specified by:
isVisible in interface net.miginfocom.layout.ComponentWrapper

getBaseline

public int getBaseline(int width,
                       int height)
Specified by:
getBaseline in interface net.miginfocom.layout.ComponentWrapper

hasBaseline

public boolean hasBaseline()
Specified by:
hasBaseline in interface net.miginfocom.layout.ComponentWrapper

getParent

public GLLayoutPainter getParent()
Specified by:
getParent in interface net.miginfocom.layout.ComponentWrapper

getLinkId

public java.lang.String getLinkId()
Specified by:
getLinkId in interface net.miginfocom.layout.ComponentWrapper

getLayoutHashCode

public int getLayoutHashCode()
Specified by:
getLayoutHashCode in interface net.miginfocom.layout.ComponentWrapper

isPadded

public boolean isPadded()

setPadding

public void setPadding(boolean v)

getVisualPadding

public int[] getVisualPadding()
Specified by:
getVisualPadding in interface net.miginfocom.layout.ComponentWrapper

getComponetType

public int getComponetType(boolean disregardScrollPane)
Specified by:
getComponetType in interface net.miginfocom.layout.ComponentWrapper

paintDebugOutline

public void paintDebugOutline()
Specified by:
paintDebugOutline in interface net.miginfocom.layout.ComponentWrapper

getPixelUnitFactor

public float getPixelUnitFactor(boolean isHor)
Specified by:
getPixelUnitFactor in interface net.miginfocom.layout.ComponentWrapper

getHorizontalScreenDPI

public int getHorizontalScreenDPI()
Specified by:
getHorizontalScreenDPI in interface net.miginfocom.layout.ComponentWrapper

getVerticalScreenDPI

public int getVerticalScreenDPI()
Specified by:
getVerticalScreenDPI in interface net.miginfocom.layout.ComponentWrapper

getScreenWidth

public int getScreenWidth()
Specified by:
getScreenWidth in interface net.miginfocom.layout.ComponentWrapper

getScreenHeight

public int getScreenHeight()
Specified by:
getScreenHeight in interface net.miginfocom.layout.ComponentWrapper

getScreenLocationX

public int getScreenLocationX()
Specified by:
getScreenLocationX in interface net.miginfocom.layout.ComponentWrapper

getScreenLocationY

public int getScreenLocationY()
Specified by:
getScreenLocationY in interface net.miginfocom.layout.ComponentWrapper

getComponents

public net.miginfocom.layout.ComponentWrapper[] getComponents()
Specified by:
getComponents in interface net.miginfocom.layout.ContainerWrapper

getComponentCount

public int getComponentCount()
Specified by:
getComponentCount in interface net.miginfocom.layout.ContainerWrapper

getLayout

public GLLayoutManger getLayout()
Specified by:
getLayout in interface net.miginfocom.layout.ContainerWrapper

isLeftToRight

public boolean isLeftToRight()
Specified by:
isLeftToRight in interface net.miginfocom.layout.ContainerWrapper

paintDebugCell

public void paintDebugCell(int x,
                           int y,
                           int width,
                           int height)
Specified by:
paintDebugCell in interface net.miginfocom.layout.ContainerWrapper


Copyright © 2012 Metron, Inc.. All Rights Reserved.