Back to index

wims  3.65+svn20090927
Public Member Functions | Public Attributes | Static Public Attributes | Package Attributes | Private Attributes
SharpTools.MainApplet Class Reference
Inheritance diagram for SharpTools.MainApplet:
Inheritance graph
[legend]
Collaboration diagram for SharpTools.MainApplet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void init ()
void stop ()
void destroy ()
void run ()
void start ()
String ReadRawApplet ()
String ReadApplet ()
void ShowSpreadSheet (String start)

Public Attributes

String visible = "TRUE"
boolean matrix = true
String language = "en"

Static Public Attributes

static boolean inapplet = true
static int ROWS
static int COLUMNS
static int FIRSTCOLUMNWIDTH
static int COLUMNWIDTH
static boolean SAVEWINDOW = false
static int X
static int Y
static int WIDTH
static int HEIGHT
static int HISTOGRAMWIDTH
static int HISTOGRAMHEIGHT
static boolean TOOLBAR_NEW = false
static boolean TOOLBAR_OPEN = false
static boolean TOOLBAR_SAVE = false
static boolean TOOLBAR_PASSWORD = false
static boolean TOOLBAR_PRINT = true
static boolean TOOLBAR_UNDO = true
static boolean TOOLBAR_REDO = true
static boolean TOOLBAR_CUT = true
static boolean TOOLBAR_COPY = true
static boolean TOOLBAR_PASTE = true
static boolean TOOLBAR_FIND = true
static boolean TOOLBAR_INSERTROW = true
static boolean TOOLBAR_INSERTCOLUMN = true
static boolean TOOLBAR_DELETEROW = true
static boolean TOOLBAR_DELETECOLUMN = true
static boolean TOOLBAR_SORTCOLUMN = true
static boolean TOOLBAR_HISTOGRAM = true
static boolean TOOLBAR_HELP = true
static boolean TOOLBAR_FUNCTIONS = true
static int NUMCONNECTIONS = 5
static String CONNECTION1NAME = ""
static String CONNECTION1USERNAME = ""
static String CONNECTION1PASSWORD = ""
static String CONNECTION1URL = ""
static String CONNECTION1DRIVER = ""
static int RECENTFILELIST = 8
static String RECENTFILE0 = ""
static String RECENTFILE1 = ""
static String RECENTFILE2 = ""
static String RECENTFILE3 = ""
static String RECENTFILE4 = ""
static String RECENTFILE5 = ""
static String RECENTFILE6 = ""
static String RECENTFILE7 = ""
static String AppletReply = ""

Package Attributes

SharpTools sharptools = null
Font defaultFont = new Font( "Helvetica", Font.BOLD, 14 )
Color green = new Color(0,255,0)
Color red = new Color(255,0,0)
Color current_color = new Color(0,255,0)
ImageIcon OpenIcon = new ImageIcon(getClass().getResource("/images/start.gif"))
ImageIcon CloseIcon = new ImageIcon(getClass().getResource("/images/close.gif"))
String Tooltip_open = "Open spreadsheet"
String Tooltip_close = "Close spreadsheet"

Private Attributes

Container container
JButton OpenButton
JButton CloseButton

Detailed Description

Definition at line 16 of file MainApplet.java.


Member Function Documentation

void SharpTools.MainApplet.destroy ( ) [inline]

Definition at line 198 of file MainApplet.java.

{}
void SharpTools.MainApplet.init ( ) [inline]

Definition at line 87 of file MainApplet.java.

                    {
    container = this.getContentPane();                                                        
    container.setLayout(new BorderLayout());
    OpenButton = new JButton(OpenIcon);
    OpenButton.setToolTipText(Tooltip_open);
    CloseButton = new JButton(CloseIcon);
    CloseButton.setToolTipText(Tooltip_close);
    container.add(OpenButton,BorderLayout.EAST);
    container.add(CloseButton,BorderLayout.WEST);
    container.validate();
    
    OpenButton.addActionListener (new ActionListener(){                                                                              
            public void actionPerformed (ActionEvent evt){
              visible="TRUE";
              ShowSpreadSheet(visible);
           }                                                                                                                          
       }
    ); 

    CloseButton.addActionListener (new ActionListener(){                                                                              
            public void actionPerformed (ActionEvent evt){
              visible="FALSE";
              ShowSpreadSheet(visible);
           }                                                                                                                          
       }
    ); 
    
    String c;
    c=getParameter("language");
    String nee="no";
    if(c.equalsIgnoreCase("en") || c.equalsIgnoreCase("nl") || c.equalsIgnoreCase("fr") ){
       language=c.toLowerCase(); 
       if(language.equals("nl")){ nee = "nee";}
       else
       if(language.equals("fr")){ nee = "non";}
       else
       if(language.equals("de")){ nee = "nein";}
    }
    else
    {
        language="en";
    }

    //c=getParameter("TOOLBAR_OPEN") cannot be set: it's an applet
    //c=getParameter("TOOLBAR_SAVE")  cannot be set: it's an applet
    //c=getParameter("TOOLBAR_PASSWORD") cannot be set: it's an applet
    c=getParameter("show_applet_on_start");   
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){visible="FALSE";}}
    c=getParameter("matrix_format");   
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){matrix=false;}}

    c=getParameter("COLUMNS");   
    if(c != null && c.length()>0){COLUMNS = Integer.parseInt(c,10);}else{ COLUMNS = 10;}
    c=getParameter("ROWS");    
    if(c != null && c.length()>0){ROWS = Integer.parseInt(c,10);}else{ ROWS = 10;}
    c=getParameter("COLUMNWIDTH");
    if(c != null && c.length()>0){COLUMNWIDTH = Integer.parseInt(c,10);}else{ COLUMNWIDTH = 80;}
    c=getParameter("FIRSTCOLUMNWIDTH");
    if(c != null && c.length()>0){FIRSTCOLUMNWIDTH = Integer.parseInt(c,10);}else{ FIRSTCOLUMNWIDTH = 25;}
    c=getParameter("X");    
    if(c != null && c.length()>0){X = Integer.parseInt(c,10);}else{ X=640;}
    c=getParameter("Y");    
    if(c != null && c.length()>0){Y = Integer.parseInt(c,10);}else{ Y=420;}
    c=getParameter("WIDTH");    
    if(c != null && c.length()>0){WIDTH = Integer.parseInt(c,10);}else{ WIDTH = 760;}
    c=getParameter("HEIGHT");    
    if(c != null && c.length()>0){HEIGHT = Integer.parseInt(c,10);}else{ HEIGHT = 484;}
    c=getParameter("HISTOGRAMWIDTH");    
    if(c != null && c.length()>0){HISTOGRAMWIDTH = Integer.parseInt(c,10);}else{ HISTOGRAMWIDTH = 500;}
    c=getParameter("HISTOGRAMHEIGHT");    
    if(c != null && c.length()>0){HISTOGRAMHEIGHT = Integer.parseInt(c,10);}else{ HISTOGRAMHEIGHT = 400;}
    c=getParameter("TOOLBAR_NEW");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_NEW=false;}}
    c=getParameter("TOOLBAR_PRINT");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_PRINT=false;}}
    c=getParameter("TOOLBAR_UNDO");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_UNDO=false;}}
    c=getParameter("TOOLBAR_REDO");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_REDO=false;}}
    c=getParameter("TOOLBAR_CUT");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_CUT=false;}}
    c=getParameter("TOOLBAR_COPY");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_COPY=false;}} 
    c=getParameter("TOOLBAR_PASTE");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_PASTE=false;}} 
    c=getParameter("TOOLBAR_FIND");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_FIND=false;}}
    c=getParameter("TOOLBAR_INSERTROW");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_INSERTROW=false;}}
    c=getParameter("TOOLBAR_INSERTCOLUMN");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_INSERTCOLUMN=false;}} 
    c=getParameter("TOOLBAR_DELETEROW");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_DELETEROW=false;}}
    c=getParameter("TOOLBAR_DELETECOLUMN");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_DELETECOLUMN=false;}}
    c=getParameter("TOOLBAR_SORTCOLUMN");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_SORTCOLUMN=false;}}
    c=getParameter("TOOLBAR_HISTOGRAM");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_HISTOGRAM=false;}}
    c=getParameter("TOOLBAR_HELP");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_HELP=false;}}
    c=getParameter("TOOLBAR_FUNCTIONS");
    if(c != null && c.length()>0){if(c.equals("0") || c.equalsIgnoreCase(nee) || c.equalsIgnoreCase("FALSE")){TOOLBAR_FUNCTIONS=false;}}

    sharptools=new SharpTools(inapplet,language);
    sharptools.setVisible(false);
    repaint();

  }

Here is the call graph for this function:

String SharpTools.MainApplet.ReadApplet ( ) [inline]

Definition at line 207 of file MainApplet.java.

                            {//send data in tab-separated or matrix format to Javascript
       // default [1,2,3;4,5,6]
       AppletReply=sharptools.ReadSpreadSheet(matrix);
       return AppletReply;
  }

Here is the call graph for this function:

Definition at line 202 of file MainApplet.java.

                               {//send data in tab-separated format to Javascript
       AppletReply=sharptools.ReadRawSpreadSheet();
       return AppletReply;
  }

Here is the call graph for this function:

void SharpTools.MainApplet.run ( ) [inline]

Definition at line 199 of file MainApplet.java.

{}
void SharpTools.MainApplet.ShowSpreadSheet ( String  start) [inline]

Definition at line 213 of file MainApplet.java.

                                           {
       if(start.equalsIgnoreCase("start") || start.equalsIgnoreCase("true") || start.equalsIgnoreCase("show") ){
           sharptools.setVisible(true);
       }
       if(start.equalsIgnoreCase("stop") || start.equalsIgnoreCase("false") || start.equalsIgnoreCase("hide")){
           sharptools.setVisible(false);
       }
    repaint();
  }

Here is the caller graph for this function:

void SharpTools.MainApplet.start ( ) [inline]

Definition at line 200 of file MainApplet.java.

{}
void SharpTools.MainApplet.stop ( ) [inline]

Definition at line 197 of file MainApplet.java.

{}

Member Data Documentation

String SharpTools.MainApplet.AppletReply = "" [static]

Definition at line 67 of file MainApplet.java.

Definition at line 76 of file MainApplet.java.

ImageIcon SharpTools.MainApplet.CloseIcon = new ImageIcon(getClass().getResource("/images/close.gif")) [package]

Definition at line 78 of file MainApplet.java.

Definition at line 23 of file MainApplet.java.

Definition at line 25 of file MainApplet.java.

Definition at line 57 of file MainApplet.java.

Definition at line 53 of file MainApplet.java.

Definition at line 55 of file MainApplet.java.

Definition at line 56 of file MainApplet.java.

Definition at line 54 of file MainApplet.java.

Container SharpTools.MainApplet.container [private]

Definition at line 74 of file MainApplet.java.

Color SharpTools.MainApplet.current_color = new Color(0,255,0) [package]

Definition at line 72 of file MainApplet.java.

Font SharpTools.MainApplet.defaultFont = new Font( "Helvetica", Font.BOLD, 14 ) [package]

Definition at line 69 of file MainApplet.java.

Definition at line 24 of file MainApplet.java.

Color SharpTools.MainApplet.green = new Color(0,255,0) [package]

Definition at line 70 of file MainApplet.java.

Definition at line 30 of file MainApplet.java.

Definition at line 32 of file MainApplet.java.

Definition at line 31 of file MainApplet.java.

Definition at line 19 of file MainApplet.java.

Definition at line 68 of file MainApplet.java.

Definition at line 20 of file MainApplet.java.

Definition at line 52 of file MainApplet.java.

Definition at line 75 of file MainApplet.java.

ImageIcon SharpTools.MainApplet.OpenIcon = new ImageIcon(getClass().getResource("/images/start.gif")) [package]

Definition at line 77 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE0 = "" [static]

Definition at line 59 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE1 = "" [static]

Definition at line 60 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE2 = "" [static]

Definition at line 61 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE3 = "" [static]

Definition at line 62 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE4 = "" [static]

Definition at line 63 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE5 = "" [static]

Definition at line 64 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE6 = "" [static]

Definition at line 65 of file MainApplet.java.

String SharpTools.MainApplet.RECENTFILE7 = "" [static]

Definition at line 66 of file MainApplet.java.

Definition at line 58 of file MainApplet.java.

Color SharpTools.MainApplet.red = new Color(255,0,0) [package]

Definition at line 71 of file MainApplet.java.

Definition at line 22 of file MainApplet.java.

Definition at line 26 of file MainApplet.java.

Definition at line 17 of file MainApplet.java.

Definition at line 41 of file MainApplet.java.

Definition at line 40 of file MainApplet.java.

Definition at line 47 of file MainApplet.java.

Definition at line 46 of file MainApplet.java.

Definition at line 43 of file MainApplet.java.

Definition at line 51 of file MainApplet.java.

Definition at line 50 of file MainApplet.java.

Definition at line 49 of file MainApplet.java.

Definition at line 45 of file MainApplet.java.

Definition at line 44 of file MainApplet.java.

Definition at line 33 of file MainApplet.java.

Definition at line 34 of file MainApplet.java.

Definition at line 36 of file MainApplet.java.

Definition at line 42 of file MainApplet.java.

Definition at line 37 of file MainApplet.java.

Definition at line 39 of file MainApplet.java.

Definition at line 35 of file MainApplet.java.

Definition at line 48 of file MainApplet.java.

Definition at line 38 of file MainApplet.java.

String SharpTools.MainApplet.Tooltip_close = "Close spreadsheet" [package]

Definition at line 80 of file MainApplet.java.

String SharpTools.MainApplet.Tooltip_open = "Open spreadsheet" [package]

Definition at line 79 of file MainApplet.java.

Definition at line 18 of file MainApplet.java.

Definition at line 29 of file MainApplet.java.

Definition at line 27 of file MainApplet.java.

Definition at line 28 of file MainApplet.java.


The documentation for this class was generated from the following file: