Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Attributes | Package Functions | Package Attributes | Private Member Functions
SharpTools.FunctionListListener Class Reference

Implements help on functions. More...

Inheritance diagram for SharpTools.FunctionListListener:
Inheritance graph
Collaboration diagram for SharpTools.FunctionListListener:
Collaboration graph

List of all members.

Public Member Functions

void actionPerformed (ActionEvent e)

Static Public Attributes

static Properties translation = SharpTools.translation

Package Functions

 FunctionListListener (JFrame frame, JTable table)

Package Attributes

JFrame frame
JTable table
final ImageIcon helpIcon = new ImageIcon(getClass().getResource("/images/help32.gif"))

Private Member Functions

void showGeneralFunctionHelp ()

Detailed Description

Implements help on functions.

When the user selects a function and he is editing, insert the function name to the editing point; otherwise, pop up a help box to briefly explain the usage of this function.

Definition at line 150 of file

Constructor & Destructor Documentation

SharpTools.FunctionListListener.FunctionListListener ( JFrame  frame,
JTable  table 
) [inline, package]

Definition at line 158 of file

       this.frame = frame;
       this.table = table;

Member Function Documentation

void SharpTools.FunctionListListener.actionPerformed ( ActionEvent  e) [inline]

Definition at line 163 of file

       JComboBox cb = (JComboBox)e.getSource();
       String funcName = (String)cb.getSelectedItem();
       try {
           if (table.isEditing()) {
              int row = table.getEditingRow();
              int col = table.getEditingRow();
              // get the editor
              JTextField text = ((SharpCellEditor)table.getCellEditor(row, col)).getTextField();

              if (!funcName.equals(translation.getProperty("Functions"))) {
                  // insert our function name
                  // set caret between parentheses if the user needs to input parameters
                  Function fh = Formula.getFuncHandler(funcName);
                  if (fh != null && fh.requireParams())
           else {
              // pop up help message box!
              Function fh = Formula.getFuncHandler(funcName);
              if (fh != null) {
                  String message = "<html><font size=2 color=black><b>"+

       catch (Exception exception) {};
       // reset the selection and focus

Here is the call graph for this function:

Definition at line 211 of file

       String message = translation.getProperty("helpmessage");
/*     "<html><font size=2 color=black><b><font size=3>Functions</font></b><p>"+
           "<p>Functions are predefined formulas that perform calculations by"+
           "<p>using specific values, called arguments, in a particular order,"+"<p>or structure.<p>"+
           "<p><b>Arguments</b> Arguments can be numbers or cell references. A cell"+
           "<p>reference can be a single cell or a range of cells.  A single cell can"+
           "<p>use relative addressing (A1) or absolute addressing ($B$5).  A range"+
           "<p>of cell is specified by a pair of diagonal cells (A1:C5, $A$1:$C$5)."+
           "<p>Different functions may have different requirements on the number"+
           "<p>or type of parameters.<p>"+
           "<p><b>Structure</b> The structure of a function begins with the function"+
           "<p>name, followed by an opening parenthesis, the arguments for"+
           "<p>the function separated by commas, and a closing parenthesis."+
           "<p>If the function starts a formula, type an equal sign (=) before"+
           "<p>the function name.  As you are editing a formula that contains"+
           "<p>a function, you can click on a function in this list to insert the"+
           "<p>function name into the cell.<p>"+


Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 153 of file

final ImageIcon SharpTools.FunctionListListener.helpIcon = new ImageIcon(getClass().getResource("/images/help32.gif")) [package]

Definition at line 155 of file

Definition at line 154 of file

Definition at line 152 of file

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