gov.lbl.genome.gui
Class VistaApp

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by gov.lbl.genome.gui.VistaApp
All Implemented Interfaces:
java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer

public class VistaApp
extends javax.swing.JApplet
implements java.lang.Runnable, java.awt.event.WindowListener

Title: VistaApp

Description: The entry point into the UI. This is a singleton classs.

Copyright: Copyright (c) 2002 Ernest Orlando Lawrence Berkeley National Laboratory

Company: LBNL

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JApplet
javax.swing.JApplet.AccessibleJApplet
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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
 boolean canResize
           
 boolean cuready
           
static boolean debugAction
           
static boolean debugComm
           
static boolean debugException
           
static boolean debugInit
           
static boolean debugProgress
           
 GeneSearchPanel geneSearchPanel
           
static java.awt.Image legend
           
 java.awt.print.PageFormat pageFormat
           
 java.awt.print.Paper paper
           
 java.awt.print.PrinterJob printJob
           
static java.lang.String RELEASE_DATE
           
 Resource resource
          This public parameter provides access to the default section of the resource file.
 java.lang.String scrollbar
           
 boolean started
           
 boolean useParameters
           
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
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
VistaApp()
          VistaApp is the main class of the applet
 
Method Summary
 void checkCurves(java.lang.String pos)
          Method checkCurves starts separate thread, check curves for visibility and set visibility rules for displayed curves
 void clearStatusBar()
          remove any text from the status bar
 int convertX(double X, int line, int offset, int width)
          convert chromosome coordinate into screen coordinate, according to the line number, offset and panel width
 int convertX(long X, int line, int offset, int width)
          convert chromosome coordinate into screen coordinate,
 void disableGUI()
          call setEnabled(false) for all components joined with action
 void enableGUI()
          call setEnabled(true) for all components joined with action
 void enablePrinting(boolean key)
          enable or disable printing actions The only reason of using this method is bug in java 1.5
 void freezeCounters(boolean f)
          Stop applet timer
 javax.swing.AbstractAction getAddAction()
          return addAction3
 GenomeInfo getBaseGenome()
          get baseGenome
 java.lang.String getBG()
          return base genome name
 int getCalcWindow()
          return calc.
 java.lang.String getChrom()
          return current chromosome
 java.lang.String getChrom(java.lang.String posString)
          try to extract chromosome name from the position string
 long getChromSize()
          return size of current chromosome or contig
 long getChromSize(java.lang.String chr)
          Return chromosome size.
 CommUnit getCommUnit()
          return a CommUnit object
 java.net.HttpURLConnection getConnection()
          return connection field
 int getConsIdentity()
          return cons.
 int getConsWidth()
          return minConsWidth
 int getDataInterval()
          return interval between two pixils
 java.lang.String getDefaultGenes()
          getDefaultGenes
 javax.swing.AbstractAction getDetailsAction()
          return detailsAction2
 Element getDialogElement(java.lang.String name)
          Retern Element from XML Document from dialogs.xml
 DisplayPanel getDisplayPanel()
          getDisplayPanel
 ErrorHandler getErrorHandler()
          return handler of the Error Message Box
 GenesInfo[] getGenesInfo()
          getGenesInfo
 int getGraphWidth()
          return adjusted width of a curve panel
 History getHistory()
          Return history object
 java.awt.Image getImage(java.lang.String name)
          download image from the server
 java.io.InputStream getInputStream()
          return InputStream from the connection
 long getMaxX()
          return maxX
 long getMaxX(int i)
          return maxX for "i" line
 long getMaxX(java.lang.String posString)
          try to extract maxX from the position string
 int getMaxY()
          deturn default/actual maxY value
 int getMaxY(CurveInfo curve)
          rerurn maxY parameter for the curve.
 long getMinX()
          return minX
 long getMinX(int i)
          return minX for "i" line
 long getMinX(java.lang.String posString)
          try to extract minX from the position string
 int getMinY()
          deturn default/actual minY value
 int getMinY(CurveInfo curve)
          rerurn minY parameter for the curve.
 int getNewHeight()
          return newHeight
 int getNewWidth()
          return newWidth
 int getNumDataPoints()
          return expected number of data points.
 java.io.OutputStream getOutputStream(java.lang.String type)
          return OutputStream to "POST" data to the server ToDo This method should throw an exception instead of returning something
 int getParam(java.lang.String parName, int defValue)
          try to get integer from Map parameters, then from applet getParameter(String) or return default value
 java.lang.String getParam(java.lang.String parName, java.lang.String defValue)
          try to get String from Map parameters, then from applet getParameter(String) or return default value
 java.lang.String getPos()
          return position as formated string
 java.lang.String getPositionString()
          return formated position string
 java.lang.String getPostHeader()
          getPostHeader
static java.lang.String getRandomString(int length)
          return string of specified length with rndom content
 javax.swing.AbstractAction getRemoveAction()
          return removeAction2
 java.lang.String getRuns()
          return servlet-ready formated run list.
 java.lang.String getSelectedOrg()
          get selected organism
 javax.swing.AbstractAction getSettingsAction()
          return settingsAction2
 java.lang.String getShow()
          return a servlet parameter "showdefaults"
 javax.swing.AbstractAction getStatAction()
          return statAction2
 SwapCurvesAction getSwapCurvesAction()
           
 java.lang.String getTextbrowserURL()
          return URL for the text browser
 java.lang.String getVersion()
          getVersion
 void init()
          This is an important and big method.
 boolean isChrom()
          return true if current contig is real chromosome
 boolean isDangerous()
          return true if action can destroy the applet.
 boolean isDefaultVisible()
          show or not to show default curves
 boolean isIdle1()
          return true if idle more than 20 min
 boolean isIdle2()
          return true if idle more than 30 sec
 boolean isIdle3()
          return true if idle more than 0.5 sec
 boolean isReady()
           
 void lastPosition()
          set status from previous position
 void nextPosition()
          set status from nextPosition
 void printStatusBar(java.lang.String s)
          show sring in the status bar
 void pushInHistory()
          push curent status in history
 void refreshOrgList()
          refresh organism list in the pull-dawn menu
 void release()
          Do some work and refresh panels after slow operations, like data pulling
 void resetConnection()
          set connection to null
 void resetCounter1()
          start 20 min counter
 void resetCounter2()
          start 30 sec counter
 void resetCounter3()
          start 0.5 sec min counter
 void run()
          Main thread of the applet.
 void setBaseGenome(GenomeInfo baseGenome)
          set baseGenome
 void setChrom(java.lang.String chr)
          set current chromosome
 void setDangerous(boolean d)
          Some actions set dangerous field in true in order to disable other actions.
static void setDebugLevel(java.lang.String dLevel)
          debugInit = "1" or "init" debugProgress = "2" or "progress" debugComm = "4" or "comm" debugAction = "8" or "action" debugException = "16" or "exception" debug All = 1|2|4|8|16 or "all"
 void setDetailsActionEnabled(boolean flag)
          call setEnabled(boolean) for detailsAction and detailsAction2
 void setForwardBackBtns()
          Enable od disable >> or/ond << button
 void setNewHeight(int nh)
          setNewHeight
 boolean setNewSize(int width, int height)
          This method is called from JavaScript and sets new applet size.
 void setNewWidth(int nw)
          setNewWidth
 void setOrgLabel(int org)
          set orgLabel
 void setParam(java.lang.String param, java.lang.Object val)
          replace an object in the parameters Map
 void setPositionString(java.lang.String string)
          set position (chromosome, start, end) from formated string
 void setPositionString(java.lang.String chr, java.lang.String min, java.lang.String max)
          set position from parameters
 void setReady(boolean f)
           
 void setSettingsVisible(boolean b)
          Enable or disable settings actions
 void setUCSCActionTip(java.lang.String tip)
          Set ToolTip for UCSC action button and menu.
 void startProgress(java.lang.String desc)
          Start RIGHT-TOP DNA Icon rotation set ready(false), stop timers, disable GUI, write comment in the status bar
 void stopProgress()
          Stop RIGHT-TOP DNA Icon rotation start timers, enable GUI, remove comment from the status bar
 void swapCurves()
          Switch base genome.
 void testPosition(int minx, int maxx)
          testPosition
 void upDate()
          currently Not used Check server for new and deleted curves and new versions since start time.
 void updateContig(java.lang.String s)
           
 void updateCurrPosition(java.lang.String s)
           
 boolean updatePosition()
          updatePosition is a key method for geting curves.
 boolean updatePosition(long minX, long maxX)
          updatePosition is a key method for geting curves.
 boolean updatePosition(java.lang.String position)
          updatePosition is a key method for geting curves.
 boolean updatePosition(java.lang.String chrom, long minX, long maxX)
          updatePosition is a key method for geting curves.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
          Stop dataPuller thread when closing
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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

resource

public Resource resource
This public parameter provides access to the default section of the resource file.


RELEASE_DATE

public static final java.lang.String RELEASE_DATE
See Also:
Constant Field Values

debugInit

public static boolean debugInit

debugComm

public static boolean debugComm

debugProgress

public static boolean debugProgress

debugAction

public static boolean debugAction

cuready

public boolean cuready

started

public boolean started

canResize

public boolean canResize

useParameters

public boolean useParameters

geneSearchPanel

public GeneSearchPanel geneSearchPanel

legend

public static java.awt.Image legend

printJob

public java.awt.print.PrinterJob printJob

pageFormat

public java.awt.print.PageFormat pageFormat

paper

public java.awt.print.Paper paper

scrollbar

public java.lang.String scrollbar

debugException

public static boolean debugException
Constructor Detail

VistaApp

public VistaApp()
VistaApp is the main class of the applet

Method Detail

getCommUnit

public CommUnit getCommUnit()
return a CommUnit object

Returns:
CommUnit

getErrorHandler

public ErrorHandler getErrorHandler()
return handler of the Error Message Box

Returns:
ErrorHandler

updatePosition

public boolean updatePosition()
updatePosition is a key method for geting curves.

Returns:
boolean
See Also:
updatePosition(String,long,long)

updatePosition

public boolean updatePosition(long minX,
                              long maxX)
updatePosition is a key method for geting curves.

Parameters:
minX - long
maxX - long
Returns:
boolean
See Also:
updatePosition(String,long,long)

getChrom

public java.lang.String getChrom(java.lang.String posString)
                          throws java.lang.Exception
try to extract chromosome name from the position string

Parameters:
posString - String
Returns:
long
Throws:
java.lang.Exception

getMinX

public long getMinX(java.lang.String posString)
             throws java.lang.Exception
try to extract minX from the position string

Parameters:
posString - String
Returns:
long
Throws:
java.lang.Exception

getMaxX

public long getMaxX(java.lang.String posString)
             throws java.lang.Exception
try to extract maxX from the position string

Parameters:
posString - String
Returns:
long
Throws:
java.lang.Exception

updatePosition

public boolean updatePosition(java.lang.String position)
updatePosition is a key method for geting curves.

Parameters:
position - String
Returns:
boolean
See Also:
updatePosition(String,long,long)

updatePosition

public boolean updatePosition(java.lang.String chrom,
                              long minX,
                              long maxX)
updatePosition is a key method for geting curves.

Parameters:
chrom - String
minX - long
maxX - long
Returns:
boolean

isChrom

public boolean isChrom()
return true if current contig is real chromosome

Returns:
boolean

getPositionString

public java.lang.String getPositionString()
return formated position string

Returns:
String

setPositionString

public void setPositionString(java.lang.String chr,
                              java.lang.String min,
                              java.lang.String max)
                       throws java.lang.Exception
set position from parameters

Parameters:
chr - String
min - String
max - String
Throws:
java.lang.Exception
See Also:
setPositionString(String)

setPositionString

public void setPositionString(java.lang.String string)
                       throws java.lang.Exception
set position (chromosome, start, end) from formated string

Parameters:
string - String
Throws:
java.lang.Exception
See Also:
setPositionString(String,String,String)

lastPosition

public void lastPosition()
set status from previous position


nextPosition

public void nextPosition()
set status from nextPosition


pushInHistory

public void pushInHistory()
push curent status in history


setForwardBackBtns

public void setForwardBackBtns()
Enable od disable >> or/ond << button


getBaseGenome

public GenomeInfo getBaseGenome()
get baseGenome

Returns:
GenomeInfo

getSelectedOrg

public java.lang.String getSelectedOrg()
get selected organism

Returns:
String
See Also:
BaseInfoPanel.getSelectedOrg()

setOrgLabel

public void setOrgLabel(int org)
set orgLabel

Parameters:
org - int
See Also:
BaseInfoPanel.setOrgLabel(int)

setBaseGenome

public void setBaseGenome(GenomeInfo baseGenome)
set baseGenome

Parameters:
baseGenome - GenomeInfo

getMinX

public long getMinX()
return minX

Returns:
long
See Also:
getMaxX(int), getMinX(int), getMaxX()

getMaxX

public long getMaxX()
return maxX

Returns:
long
See Also:
getMaxX(int), getMinX(int), getMinX()

getMinX

public long getMinX(int i)
return minX for "i" line

Parameters:
i - int
Returns:
long
See Also:
getMaxX(), getMaxX(int), getMinX()

getMaxX

public long getMaxX(int i)
return maxX for "i" line

Parameters:
i - int
Returns:
long
See Also:
getMaxX(), getMinX(int), getMinX()

getConsIdentity

public int getConsIdentity()
return cons. identity (parameter "min_id")

Returns:
int

getCalcWindow

public int getCalcWindow()
return calc. window (parameter "window")

Returns:
int

getMinY

public int getMinY()
deturn default/actual minY value

Returns:
int
See Also:
getMaxY(CurveInfo), getMaxY()

getMinY

public int getMinY(CurveInfo curve)
rerurn minY parameter for the curve. This parameter determins minY of the curve at startup.

Parameters:
curve - CurveInfo
Returns:
int
See Also:
getMaxY(CurveInfo), getMaxY()

getMaxY

public int getMaxY()
deturn default/actual maxY value

Returns:
int
See Also:
getMinY(CurveInfo), getMinY()

getMaxY

public int getMaxY(CurveInfo curve)
rerurn maxY parameter for the curve. This parameter determins maxY of the curve at startup.

Parameters:
curve - CurveInfo
Returns:
int
See Also:
getMinY(CurveInfo), getMinY()

getConsWidth

public int getConsWidth()
return minConsWidth

Returns:
int

isDefaultVisible

public boolean isDefaultVisible()
show or not to show default curves

Returns:
boolean

setChrom

public void setChrom(java.lang.String chr)
set current chromosome

Parameters:
chr - String

getChrom

public java.lang.String getChrom()
return current chromosome

Returns:
String

getConnection

public java.net.HttpURLConnection getConnection()
return connection field

Returns:
HttpURLConnection

getInputStream

public java.io.InputStream getInputStream()
return InputStream from the connection

Returns:
InputStream

resetConnection

public void resetConnection()
set connection to null


getGenesInfo

public GenesInfo[] getGenesInfo()
getGenesInfo

Returns:
GenesInfo[]
See Also:
GenesInfo, GenomeInfo.getGenesInfos()

getDefaultGenes

public java.lang.String getDefaultGenes()
getDefaultGenes

Returns:
String

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.String type)
return OutputStream to "POST" data to the server ToDo This method should throw an exception instead of returning something

Parameters:
type - String
Returns:
OutputStream

getImage

public java.awt.Image getImage(java.lang.String name)
download image from the server

Parameters:
name - String
Returns:
Image

getTextbrowserURL

public java.lang.String getTextbrowserURL()
return URL for the text browser

Returns:
String

getRuns

public java.lang.String getRuns()
return servlet-ready formated run list.

Returns:
String

getPos

public java.lang.String getPos()
return position as formated string

Returns:
String

getShow

public java.lang.String getShow()
return a servlet parameter "showdefaults"

Returns:
String

getBG

public java.lang.String getBG()
return base genome name

Returns:
String

printStatusBar

public void printStatusBar(java.lang.String s)
show sring in the status bar

Parameters:
s - String

clearStatusBar

public void clearStatusBar()
remove any text from the status bar


stopProgress

public void stopProgress()
Stop RIGHT-TOP DNA Icon rotation start timers, enable GUI, remove comment from the status bar

See Also:
startProgress(String)

startProgress

public void startProgress(java.lang.String desc)
Start RIGHT-TOP DNA Icon rotation set ready(false), stop timers, disable GUI, write comment in the status bar

Parameters:
desc - String #see stopProgress()

init

public void init()
This is an important and big method. A lot of parameters and objects are created here.

Overrides:
init in class java.applet.Applet

getDataInterval

public int getDataInterval()
return interval between two pixils

Returns:
int

getNumDataPoints

public int getNumDataPoints()
return expected number of data points.

Returns:
int

getGraphWidth

public int getGraphWidth()
return adjusted width of a curve panel

Returns:
int

convertX

public int convertX(long X,
                    int line,
                    int offset,
                    int width)
convert chromosome coordinate into screen coordinate,

Parameters:
X - double
line - int
offset - int
width - int
Returns:
int
See Also:
convertX(double,int,int,int)

convertX

public int convertX(double X,
                    int line,
                    int offset,
                    int width)
convert chromosome coordinate into screen coordinate, according to the line number, offset and panel width

Parameters:
X - double
line - int
offset - int
width - int
Returns:
int

updateCurrPosition

public void updateCurrPosition(java.lang.String s)
Parameters:
s - String
See Also:
CursorInfoPanel.setPosition(String)

updateContig

public void updateContig(java.lang.String s)
Parameters:
s - String
See Also:
CursorInfoPanel.setContig(String)

getDisplayPanel

public DisplayPanel getDisplayPanel()
getDisplayPanel

Returns:
DisplayPanel

getDetailsAction

public javax.swing.AbstractAction getDetailsAction()
return detailsAction2

Returns:
AbstractAction
See Also:
DetailsAction

setDetailsActionEnabled

public void setDetailsActionEnabled(boolean flag)
call setEnabled(boolean) for detailsAction and detailsAction2

Parameters:
flag - boolean

getSettingsAction

public javax.swing.AbstractAction getSettingsAction()
return settingsAction2

Returns:
AbstractAction
See Also:
SettingsAction

getRemoveAction

public javax.swing.AbstractAction getRemoveAction()
return removeAction2

Returns:
AbstractAction
See Also:
RemoveAction

getStatAction

public javax.swing.AbstractAction getStatAction()
return statAction2

Returns:
AbstractAction
See Also:
StatAction

getVersion

public java.lang.String getVersion()
getVersion

Returns:
String

enableGUI

public void enableGUI()
call setEnabled(true) for all components joined with action


disableGUI

public void disableGUI()
call setEnabled(false) for all components joined with action


setParam

public void setParam(java.lang.String param,
                     java.lang.Object val)
replace an object in the parameters Map

Parameters:
param - String
val - Object

getParam

public java.lang.String getParam(java.lang.String parName,
                                 java.lang.String defValue)
try to get String from Map parameters, then from applet getParameter(String) or return default value

Parameters:
parName - String
defValue - String
Returns:
String

getParam

public int getParam(java.lang.String parName,
                    int defValue)
try to get integer from Map parameters, then from applet getParameter(String) or return default value

Parameters:
parName - String
defValue - int
Returns:
int

setDebugLevel

public static void setDebugLevel(java.lang.String dLevel)
debugInit = "1" or "init" debugProgress = "2" or "progress" debugComm = "4" or "comm" debugAction = "8" or "action" debugException = "16" or "exception" debug All = 1|2|4|8|16 or "all"

Parameters:
dLevel - String

getChromSize

public long getChromSize(java.lang.String chr)
                  throws VGBException
Return chromosome size. First try to find chromosome info in the applet records, id failed, try to ask server about the chromosome.

Parameters:
chr - String
Returns:
long
Throws:
VGBException

getChromSize

public long getChromSize()
                  throws VGBException
return size of current chromosome or contig

Returns:
long
Throws:
VGBException

release

public void release()
Do some work and refresh panels after slow operations, like data pulling


setReady

public void setReady(boolean f)
Parameters:
f - boolean
See Also:
isReady()

isReady

public boolean isReady()
Returns:
boolean
See Also:
setReady(boolean)

run

public void run()
Main thread of the applet. Doing lots of things. At start time pulls al configuration files from our server, creates important panels, creates instance of CommUnit and starts data pulling. During lifetime manages three timers and applet size. Updates information from server when the applet is idle.

Specified by:
run in interface java.lang.Runnable

upDate

public void upDate()
currently Not used Check server for new and deleted curves and new versions since start time.

See Also:
up2date(String)

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Stop dataPuller thread when closing

Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - WindowEvent

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

resetCounter1

public void resetCounter1()
start 20 min counter


resetCounter2

public void resetCounter2()
start 30 sec counter


resetCounter3

public void resetCounter3()
start 0.5 sec min counter


isIdle1

public boolean isIdle1()
return true if idle more than 20 min

Returns:
boolean

isIdle2

public boolean isIdle2()
return true if idle more than 30 sec

Returns:
boolean

isIdle3

public boolean isIdle3()
return true if idle more than 0.5 sec

Returns:
boolean

freezeCounters

public void freezeCounters(boolean f)
Stop applet timer

Parameters:
f - boolean

getRandomString

public static java.lang.String getRandomString(int length)
return string of specified length with rndom content

Parameters:
length - int
Returns:
String

getAddAction

public javax.swing.AbstractAction getAddAction()
return addAction3

Returns:
AbstractAction

checkCurves

public void checkCurves(java.lang.String pos)
Method checkCurves starts separate thread, check curves for visibility and set visibility rules for displayed curves

Parameters:
pos - String
See Also:
CommUnit.checkCurves(Vector, String)

refreshOrgList

public void refreshOrgList()
refresh organism list in the pull-dawn menu


getHistory

public History getHistory()
Return history object

Returns:
History

getSwapCurvesAction

public SwapCurvesAction getSwapCurvesAction()

swapCurves

public void swapCurves()
                throws java.lang.Exception
Switch base genome. Works if only one curve is selected.

Throws:
java.lang.Exception

setUCSCActionTip

public void setUCSCActionTip(java.lang.String tip)
Set ToolTip for UCSC action button and menu.

Parameters:
tip - String

testPosition

public void testPosition(int minx,
                         int maxx)
testPosition

Parameters:
minx - int
maxx - int

getDialogElement

public Element getDialogElement(java.lang.String name)
Retern Element from XML Document from dialogs.xml

Parameters:
name - String
Returns:
Element

setNewSize

public boolean setNewSize(int width,
                          int height)
This method is called from JavaScript and sets new applet size. This doesn't happen in all browsers

Parameters:
width - int
height - int
Returns:
boolean

setNewWidth

public void setNewWidth(int nw)
setNewWidth

Parameters:
nw - int
See Also:
setNewSize(int,int)

setNewHeight

public void setNewHeight(int nh)
setNewHeight

Parameters:
nh - int
See Also:
setNewSize(int,int)

getNewWidth

public int getNewWidth()
return newWidth

Returns:
int
See Also:
setNewWidth(int)

getNewHeight

public int getNewHeight()
return newHeight

Returns:
int
See Also:
setNewHeight(int)

setSettingsVisible

public void setSettingsVisible(boolean b)
Enable or disable settings actions

Parameters:
b - boolean

enablePrinting

public void enablePrinting(boolean key)
enable or disable printing actions The only reason of using this method is bug in java 1.5

Parameters:
key - boolean
See Also:
PrintAction.run(), PrinterSetupAction.run()

setDangerous

public void setDangerous(boolean d)
Some actions set dangerous field in true in order to disable other actions. When the action is completed it must return dangerous to false

Parameters:
d - boolean
See Also:
isDangerous()

isDangerous

public boolean isDangerous()
return true if action can destroy the applet. So, the action must be disabled or delayed

Returns:
boolean
See Also:
setDangerous(boolean), startProgress(java.lang.String), stopProgress()

getPostHeader

public java.lang.String getPostHeader()
getPostHeader

Returns:
String
See Also:
SaveAsAction.saveData(OutputStream,ByteArrayOutputStream)