de.tubs.macs.applications.whiteboard
Class Whiteboard

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--de.tubs.macs.applications.whiteboard.Whiteboard

public class Whiteboard
extends java.lang.Thread
implements MacsApplication, java.awt.event.WindowListener


Inner Class Summary
(package private)  class Whiteboard.ColoredSquare
           
(package private)  class Whiteboard.ExitAction
           
(package private)  class Whiteboard.ImportPSAction
           
(package private)  class Whiteboard.LandscapeAction
           
(package private)  class Whiteboard.NextPSAction
           
(package private)  class Whiteboard.OpenAction
           
(package private)  class Whiteboard.OptionsAction
           
(package private)  class Whiteboard.PagePSAction
           
(package private)  class Whiteboard.PortraitAction
           
(package private)  class Whiteboard.SaveAction
           
 
Field Summary
 ApplicationID applicationID
           
protected  javax.swing.JPanel canvasPanel
           
static java.lang.String currentDir
           
static Debug debug
           
protected  javax.swing.Action[] defaultActions
           
static java.lang.String DirSeparator
           
 javax.swing.JComponent display
           
static java.lang.String exitAction
          Actions for Whiteboard class
protected  javax.swing.JButton floorButton
           
(package private)  java.lang.String group
           
(package private)  boolean havePaintFloor
           
protected  javax.swing.JButton importPS
           
static java.lang.String importpsAction
           
static java.lang.String landscAction
           
static java.awt.Dimension LANDSCAPE
           
static Log log
           
static java.lang.String MACSWB_HOME
           
 java.awt.Image markerImage
           
static long MyID
           
(package private)  NetAddress netAddress
           
static NetManager netManager
          Access to MACS Network Manager; either in MacsControl or in Whiteboard, if running stand-alone
(package private)  java.lang.String netOptions
           
 java.lang.String netPropertiesFile
           
protected  Resource netResource
           
(package private)  java.lang.String netType
           
protected  javax.swing.JButton nextPS
           
static java.lang.String nextpsAction
           
static java.lang.String openAction
           
static java.lang.String optionsAction
           
protected  javax.swing.JLabel pageMax
           
protected  javax.swing.JTextField pageNum
           
protected  javax.swing.JTextField pagePS
           
static java.lang.String pagepsAction
           
 WbControlPane pane
           
static java.lang.String portraitAction
           
protected  javax.swing.JPanel postPages
           
 java.lang.String propertiesFile
           
 java.lang.String PSFile
           
 int PSPage
           
 boolean RecvMarker
           
 boolean RecvPageflip
           
 boolean RecvTelePtr
           
static int ROTATE_PS_DONT
           
static int ROTATE_PS_LEFT
           
static int ROTATE_PS_RIGHT
           
 boolean RotateLeft
           
 boolean RotateRight
           
static java.lang.String saveAction
           
 boolean SendPageflip
           
 boolean SendTelePtr
           
 Session session
           
 long SessionTime
           
 boolean ShowToolbar
           
 long Timebase
           
static java.lang.String TMP_DIR
           
 java.awt.Color UserColor
           
protected  javax.swing.JFrame userFrame
           
protected  WbCanvas wbCanvas
           
protected  javax.swing.JFrame wbFrame
           
protected  javax.swing.JToolBar wbPagetools
           
protected  WbRemoteOperation wbRemoteOps
           
protected  Resource wbResource
           
protected  WbStorage wbStorage
           
protected  javax.swing.JToolBar wbToolbox
           
protected  java.awt.Container windowRoot
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, values
 
Constructor Summary
Whiteboard()
          Constructor for use with MacsControl
Whiteboard(java.lang.String name, java.lang.String netType, java.lang.String group, java.lang.String netOptions)
          Constructor for use in stand-alone usage
 
Method Summary
 void changePaintFloor()
           
static java.lang.String convertPS(java.lang.String psFile, int page, int rot)
           
 void deleteTempFiles()
           
 void exitApplication()
          method to exit and shutdown the application This method MUST always be called bei MacsControl! NEVER ever call this method in the application.
static java.lang.String FileRequester(java.lang.String msg)
           
static java.lang.String FileRequester(java.lang.String msg, int mode)
           
 javax.swing.Action[] getActions()
           
static java.awt.Color getColorFromString(java.lang.String cname)
           
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
 long getSessionTime()
           
 int getVersionMajor()
          method to return the major version of the application, e.g.
 int getVersionMinor()
          method to return the minor version of the application, e.g.
 java.lang.String getVersionName()
          method to return the version name of the application We'll see later, what we need here...
 boolean havePaintFloor()
           
 boolean initApplication(ApplicationID id, Session session, javax.swing.JComponent display)
          init-method according MacsApplication interface
static boolean isPostscript(java.lang.String fileName)
           
 void Landscape()
           
 void LoadFile()
           
static byte[] loadImage(java.lang.String name)
           
 java.lang.String LoadRequester(java.lang.String msg)
           
static void main(java.lang.String[] args)
           
 void Portrait()
           
 void processSessionEvent(SessionEvent event)
          this is informative (asynchrone).
 void releasePaintFloor()
           
 void requestPaintFloor()
           
 void run()
           
 void SaveFile()
           
 java.lang.String SaveRequester(java.lang.String msg)
           
 void setFloorButton(boolean have)
           
 boolean startApplication()
          method to start the application
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 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 java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MyID

public static long MyID

applicationID

public ApplicationID applicationID

wbFrame

protected javax.swing.JFrame wbFrame

userFrame

protected javax.swing.JFrame userFrame

windowRoot

protected java.awt.Container windowRoot

canvasPanel

protected javax.swing.JPanel canvasPanel

wbCanvas

protected WbCanvas wbCanvas

wbRemoteOps

protected WbRemoteOperation wbRemoteOps

wbStorage

protected WbStorage wbStorage

wbResource

protected Resource wbResource

netResource

protected Resource netResource

wbToolbox

protected javax.swing.JToolBar wbToolbox

wbPagetools

protected javax.swing.JToolBar wbPagetools

pageNum

protected javax.swing.JTextField pageNum

pageMax

protected javax.swing.JLabel pageMax

floorButton

protected javax.swing.JButton floorButton

importPS

protected javax.swing.JButton importPS

nextPS

protected javax.swing.JButton nextPS

pagePS

protected javax.swing.JTextField pagePS

postPages

protected javax.swing.JPanel postPages

propertiesFile

public java.lang.String propertiesFile

netPropertiesFile

public java.lang.String netPropertiesFile

MACSWB_HOME

public static java.lang.String MACSWB_HOME

TMP_DIR

public static java.lang.String TMP_DIR

log

public static Log log

debug

public static Debug debug

netManager

public static NetManager netManager
Access to MACS Network Manager; either in MacsControl or in Whiteboard, if running stand-alone

session

public Session session

display

public javax.swing.JComponent display

DirSeparator

public static java.lang.String DirSeparator

currentDir

public static java.lang.String currentDir

pane

public WbControlPane pane

UserColor

public java.awt.Color UserColor

PSFile

public java.lang.String PSFile

PSPage

public int PSPage

exitAction

public static final java.lang.String exitAction
Actions for Whiteboard class

openAction

public static final java.lang.String openAction

saveAction

public static final java.lang.String saveAction

landscAction

public static final java.lang.String landscAction

portraitAction

public static final java.lang.String portraitAction

optionsAction

public static final java.lang.String optionsAction

importpsAction

public static final java.lang.String importpsAction

nextpsAction

public static final java.lang.String nextpsAction

pagepsAction

public static final java.lang.String pagepsAction

defaultActions

protected javax.swing.Action[] defaultActions

LANDSCAPE

public static java.awt.Dimension LANDSCAPE

Timebase

public long Timebase

SessionTime

public long SessionTime

netType

java.lang.String netType

group

java.lang.String group

netOptions

java.lang.String netOptions

netAddress

NetAddress netAddress

havePaintFloor

boolean havePaintFloor

SendTelePtr

public boolean SendTelePtr

RecvTelePtr

public boolean RecvTelePtr

SendPageflip

public boolean SendPageflip

RecvPageflip

public boolean RecvPageflip

ShowToolbar

public boolean ShowToolbar

RecvMarker

public boolean RecvMarker

RotateLeft

public boolean RotateLeft

RotateRight

public boolean RotateRight

ROTATE_PS_DONT

public static transient int ROTATE_PS_DONT

ROTATE_PS_LEFT

public static transient int ROTATE_PS_LEFT

ROTATE_PS_RIGHT

public static transient int ROTATE_PS_RIGHT

markerImage

public java.awt.Image markerImage
Constructor Detail

Whiteboard

public Whiteboard()
Constructor for use with MacsControl

Whiteboard

public Whiteboard(java.lang.String name,
                  java.lang.String netType,
                  java.lang.String group,
                  java.lang.String netOptions)
Constructor for use in stand-alone usage
Parameters:
name - Name of application
netType - Type of network-class
group - multicast address of group
port - port
ttl - ttl
Method Detail

initApplication

public boolean initApplication(ApplicationID id,
                               Session session,
                               javax.swing.JComponent display)
init-method according MacsApplication interface
Specified by:
initApplication in interface MacsApplication
Parameters:
session - session the whiteboard runs in
group - group of whiteboard
control - reference to MacsControl instance
display - panel given by MacsControl

startApplication

public boolean startApplication()
Description copied from interface: MacsApplication
method to start the application
Specified by:
startApplication in interface MacsApplication
Tags copied from interface: MacsApplication
Returns:
true, if ok

Portrait

public void Portrait()

Landscape

public void Landscape()

getSessionTime

public long getSessionTime()

processSessionEvent

public void processSessionEvent(SessionEvent event)
Description copied from interface: MacsApplication
this is informative (asynchrone). also contains floor-events (FloorEvent extends SessionEvent)
Specified by:
processSessionEvent in interface MacsApplication

setFloorButton

public void setFloorButton(boolean have)

changePaintFloor

public void changePaintFloor()

requestPaintFloor

public void requestPaintFloor()

releasePaintFloor

public void releasePaintFloor()

havePaintFloor

public boolean havePaintFloor()

getMinimumSize

public java.awt.Dimension getMinimumSize()

getPreferredSize

public java.awt.Dimension getPreferredSize()

getVersionMajor

public int getVersionMajor()
Description copied from interface: MacsApplication
method to return the major version of the application, e.g. X for Version X.Y
Specified by:
getVersionMajor in interface MacsApplication

getVersionMinor

public int getVersionMinor()
Description copied from interface: MacsApplication
method to return the minor version of the application, e.g. Y for Version X.Y
Specified by:
getVersionMinor in interface MacsApplication

getVersionName

public java.lang.String getVersionName()
Description copied from interface: MacsApplication
method to return the version name of the application We'll see later, what we need here...
Specified by:
getVersionName in interface MacsApplication

exitApplication

public void exitApplication()
Description copied from interface: MacsApplication
method to exit and shutdown the application This method MUST always be called bei MacsControl! NEVER ever call this method in the application.

Specified by:
exitApplication in interface MacsApplication

run

public void run()
Overrides:
run in class java.lang.Thread

main

public static void main(java.lang.String[] args)

deleteTempFiles

public void deleteTempFiles()

getColorFromString

public static java.awt.Color getColorFromString(java.lang.String cname)

convertPS

public static java.lang.String convertPS(java.lang.String psFile,
                                         int page,
                                         int rot)

LoadFile

public void LoadFile()

SaveFile

public void SaveFile()

FileRequester

public static java.lang.String FileRequester(java.lang.String msg)

SaveRequester

public java.lang.String SaveRequester(java.lang.String msg)

LoadRequester

public java.lang.String LoadRequester(java.lang.String msg)

FileRequester

public static java.lang.String FileRequester(java.lang.String msg,
                                             int mode)

loadImage

public static byte[] loadImage(java.lang.String name)

isPostscript

public static boolean isPostscript(java.lang.String fileName)

getActions

public javax.swing.Action[] getActions()

windowOpened

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

windowClosing

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

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed 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