|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--ArrayScroller
This class supports the scrollable clickable pseudoarray image. The image is contained in the ScrollableImageCanvas which uses DrawPseudoImage to generate the image to draw on the canvas. It also has a text-title, ScrollableImageCanvas, horizontal and vertical scroll bars used to scrolling the canvas. The ArrayScroller is created as part of the GUI before the pseudoarray images has been generated. Therefore, we need to do several setXXXX() method calls after the image has been generated to have the the ArrayScroller "stuff" it as needed.
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
DrawPseudoImage
,
ScrollableImageCanvas
, Serialized FormInner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) java.awt.Scrollbar |
hs
opt. |
(package private) boolean |
img_selectedFlag
flag: set if xObj,yObj is set |
private java.awt.Color |
lastBG1
last background colors cached for showMsg1 |
private java.awt.Color |
lastBG2
last background colors cached for showMsg2 |
private java.awt.Color |
lastBG3
last background colors cached for showMsg3 |
private java.awt.Color |
lastFG1
last foreground colors cached for showMsg1 |
private java.awt.Color |
lastFG2
last foreground colors cached for showMsg2 |
private java.awt.Color |
lastFG3
last foreground colors cached for showMsg3 |
(package private) MAExplorer |
mae
link to global MAExplorer instance |
(package private) int |
magnification
magnification |
(package private) MaHybridSample |
msR
link to global MaHybridSample instance |
(package private) java.lang.String |
name
HP sample name |
(package private) int |
pagestep
scrollbar thickness |
int |
preferredHeight
height of panel |
int |
preferredWidth
width of panel |
(package private) ScrollableImageCanvas |
siCanvas
instance of the scrollable image canvas |
(package private) java.awt.Panel |
southPanel
opt. |
(package private) int |
steps
prewired scroller steps |
(package private) java.lang.String |
title
current title for window |
(package private) java.awt.TextField |
txtField1
image title placed above canvas |
(package private) java.awt.TextField |
txtField2
genomic info placed above canvas |
(package private) java.awt.TextField |
txtField3
additional genomic info placed above canvas |
(package private) java.awt.Scrollbar |
vs
opt. |
Fields inherited from class java.awt.Panel |
base, nameCounter, serialVersionUID |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
ArrayScroller(MAExplorer mae,
java.lang.String name,
java.lang.String title,
int iWidth,
int iHeight,
int preferredWidth,
int preferredHeight,
int magnification)
ArrayScroller() - constructor. |
Method Summary | |
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged() - handle ArrayScroller scroll events. |
(package private) void |
drawImageTitle()
drawImageTitle() - draw title in image. |
(package private) java.awt.Point |
getImgCursor()
getImgCursor() - get the (x,y) scrollable cursor for this image |
(package private) java.awt.Point |
getImgCursorMax()
getImgCursorMax() - get the (x,y) scrollable image cursor maxima. |
(package private) java.awt.Point |
getImgPos()
getImgPos() - get the Image position |
(package private) java.awt.Point |
getObjPos()
getObjPos() - get the object position |
java.awt.Dimension |
getPreferredSize()
getPreferredSize() - get the preferred window size |
void |
mouseClicked(java.awt.event.MouseEvent e)
mouseClicked() - handle mouse Click event by passing it to ScrollableImageCanvas to handle. |
void |
mouseDragged(java.awt.event.MouseEvent e)
mouseDragged() - handle mouse Drag event by passing it to ScrollableImageCanvas to handle. |
void |
mouseEntered(java.awt.event.MouseEvent e)
mouseEntered() - handle mouse Enter events by passing it to ScrollableImageCanvas to handle. |
void |
mouseExited(java.awt.event.MouseEvent e)
mouseExited() - handle mouse Exit events by passing it to ScrollableImageCanvas to handle. |
void |
mouseMoved(java.awt.event.MouseEvent e)
mouseMoved() - handle mouse Move event by passing it to ScrollableImageCanvas to handle. |
void |
mousePressed(java.awt.event.MouseEvent e)
mousePressed() - handle mouse pressed event by passing it to ScrollableImageCanvas to handle. |
void |
mouseReleased(java.awt.event.MouseEvent e)
mouseReleased() - handle mouse released event by passing it to ScrollableImageCanvas to handle. |
(package private) void |
recreateScollableCanvas(int iWidth,
int iHeight)
recreateScollableCanvas() - Resize canvas with new size by making a new ScrollableImageCanvas. |
(package private) void |
setArrayScrollerSize(int hSize,
int vSize)
setArrayScrollerSize() - set the Image Scroller size |
(package private) void |
setImgPos(int xImg,
int yImg)
setImgPos() - set the Image position (x,y). |
(package private) void |
setImgPos(java.awt.Point xyImg)
setImgPos() - set the Image position Point xyImg. |
(package private) void |
setObjPos(int xObj,
int yObj)
setObjPos) - set the object position (x,y). |
(package private) void |
setObjPos(java.awt.Point xyObj)
setObjPos() - set the object position xyObj. |
(package private) void |
setScrollBar(int x,
int y)
setScrollBar() - set the scroll bars (x,y) position for this image. |
(package private) void |
setScrollPageSteps(int pagestep,
int steps)
setScrollPageSteps() - set scroll bar pagestep and steps |
(package private) void |
setText1(java.lang.String msg,
boolean saveTitleFlag)
setText1() - change the text1 msg for the panel. |
(package private) void |
setText1(java.lang.String msg,
boolean saveTitleFlag,
java.awt.Color fg,
java.awt.Color bg)
setText1() - change the text1 field in the panel with fg, bg colors You can save the msg as the title. |
(package private) void |
setText2(java.lang.String msg)
setText2() - change the text2 field in the panel. |
(package private) void |
setText2(java.lang.String msg,
java.awt.Color fg,
java.awt.Color bg)
setText2() - change the text2 field in the panel with fg, bg colors |
(package private) void |
setText3(java.lang.String msg)
setText3() - change the text3 field in the panel. |
(package private) void |
setText3(java.lang.String msg,
java.awt.Color fg,
java.awt.Color bg)
setText3() - change the text3 field in the panel with fg, bg colors |
(package private) void |
syncScrollerAccess()
syncScrollerAccess() - update the image scroller and sync canvas access to current HP's pseudoarray image, ms, msX, msY |
Methods inherited from class java.awt.Panel |
|
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paint, paintComponents, paintHeavyweightComponents, paramString, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, readObject, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusOwner, setFont, setLayout, transferFocus, update, validate, validateTree, writeObject |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
MAExplorer mae
MaHybridSample msR
ScrollableImageCanvas siCanvas
java.awt.Panel southPanel
java.awt.Scrollbar vs
java.awt.Scrollbar hs
java.awt.TextField txtField1
java.awt.TextField txtField2
java.awt.TextField txtField3
java.lang.String name
java.lang.String title
private java.awt.Color lastFG1
private java.awt.Color lastBG1
private java.awt.Color lastFG2
private java.awt.Color lastBG2
private java.awt.Color lastFG3
private java.awt.Color lastBG3
int magnification
public int preferredWidth
public int preferredHeight
int steps
int pagestep
boolean img_selectedFlag
Constructor Detail |
ArrayScroller(MAExplorer mae, java.lang.String name, java.lang.String title, int iWidth, int iHeight, int preferredWidth, int preferredHeight, int magnification)
mae
- is the MAExplorer instancename
- of the current microarray sampletitle
- of the windowiWidth
- of scrollableImageCanvasiHeight
- of scrollableImageCanvaspreferredWidth
- is the size of mae.is main windowpreferredHeight
- is the size of mae.ismagnification
- of arrayScrollableImageCanvas
,
syncScrollerAccess()
Method Detail |
void recreateScollableCanvas(int iWidth, int iHeight)
iWidth
- of scrollableImageCanvasiHeight
- of scrollableImageCanvasScrollableImageCanvas
,
syncScrollerAccess()
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Container
void syncScrollerAccess()
ScrollableImageCanvas.syncCanvasAccess()
void setText1(java.lang.String msg, boolean saveTitleFlag)
text
- to save in text fieldsaveTitleFlag
- to save text of last messagevoid setText1(java.lang.String msg, boolean saveTitleFlag, java.awt.Color fg, java.awt.Color bg)
msg
- to save in text fieldsaveTitleFlag
- to save text of last messagefg
- is foreground colorbg
- is background colorvoid setText2(java.lang.String msg)
msg
- to save in text fieldvoid setText2(java.lang.String msg, java.awt.Color fg, java.awt.Color bg)
msg
- to save in text fieldfg
- is foreground colorbg
- is background colorvoid setText3(java.lang.String msg)
msg
- to save in text fieldsetText3(java.lang.String)
void setText3(java.lang.String msg, java.awt.Color fg, java.awt.Color bg)
msg
- to save in text fieldfg
- is foreground colorbg
- is background colorvoid setImgPos(java.awt.Point xyImg)
xyImg
- is the image positionScrollableImageCanvas.setImgPos(MaHybridSample, int, int)
,
syncScrollerAccess()
void setImgPos(int xImg, int yImg)
xImg
- is the image positionyImg
- is the image positionScrollableImageCanvas.setImgPos(MaHybridSample, int, int)
,
syncScrollerAccess()
java.awt.Point getImgPos()
ScrollableImageCanvas.getImgPos()
,
syncScrollerAccess()
void setObjPos(java.awt.Point xyObj)
xyObj
- is the object (i.e. gene) positionScrollableImageCanvas.setObjPos(int, int)
,
syncScrollerAccess()
void setObjPos(int xObj, int yObj)
xObj
- is the object (i.e. gene) positionyObj
- is the object (i.e. gene) positionScrollableImageCanvas.setObjPos(int, int)
,
syncScrollerAccess()
java.awt.Point getObjPos()
ScrollableImageCanvas.getObjPos()
,
syncScrollerAccess()
void setScrollPageSteps(int pagestep, int steps)
pagestep
- is the scroll bar paging sizesteps
- is the scroll bar # of stepsComponent.repaint()
,
syncScrollerAccess()
void setArrayScrollerSize(int hSize, int vSize)
hSize
- is the scroll bar horizontal sizevSize
- is the scroll bar vertical sizeScrollableImageCanvas
void drawImageTitle()
ScrollableImageCanvas.drawImageTitle()
java.awt.Point getImgCursor()
java.awt.Point getImgCursorMax()
void setScrollBar(int x, int y)
x
- is scrollabar position to sety
- is scrollabar position to setComponent.repaint()
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged
in interface java.awt.event.AdjustmentListener
e
- is scroller adjustment eventComponent.repaint()
,
ScrollableImageCanvas.setImgPos(MaHybridSample, int, int)
,
ScrollableImageCanvas.setObjPos(int, int)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- is mouse press eventScrollableImageCanvas.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- is mouse released eventScrollableImageCanvas.mouseReleased(java.awt.event.MouseEvent)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- is mouse clicked eventScrollableImageCanvas.mouseClicked(java.awt.event.MouseEvent)
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- is mouse moved eventScrollableImageCanvas.mouseMoved(java.awt.event.MouseEvent)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- is mousedragged eventScrollableImageCanvas.mouseDragged(java.awt.event.MouseEvent)
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- is mouse entered eventScrollableImageCanvas.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- is mouse left eventScrollableImageCanvas.mouseExited(java.awt.event.MouseEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |