Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.UsageException


              return Constants.FS_UPDATE;
          }
          return UIutils.getWindowUsage((JFrame)frame);
        }
        catch (InvocationTargetException e) {
            UsageException errorVar = new UsageException("getWindowUsage() cannot locate the usage table, check that this JFrame was generated from jcTOOL", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        catch (NoSuchMethodException e) {
            UsageException errorVar = new UsageException("getWindowUsage() cannot locate the usage table, check that this JFrame was generated from jcTOOL", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        catch (Throwable e) {
            UsageException errorVar = new UsageException("getWindowUsage() failure", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here


            }
            form.putClientProperty("qq_FNkeyCount", count);
            return count.intValue();
        }
        catch (NullPointerException e) {
            UsageException errorVar = new UsageException("NullPointerException on getForm() in window " + win.getName(), e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        catch (Exception e) {
            UsageException errorVar = new UsageException("The JFrame: " + win.getName() + " dose not have a Form property", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

        // See if there are character ranges (eg [0-9]) which are legal in
        // Forte but not in java
        m = optionalCharacters.matcher(aBuffer.toString());
        if (m.find()) {
            _log.debug("Java templates have no equivalent to character ranges in Forte (" + m.group(2) + " entered)");
            UsageException errorVar = new UsageException("Java templates have no equivalent to character ranges in Forte (" + m.group(2) + " entered)");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }

        // Look for any unescaped brackets
        m = repititionCount.matcher(aBuffer.toString());
        while (m.find()) {
            int count = Integer.parseInt(m.group(2));
            int end = m.end(2);
            char c = aBuffer.charAt(end + 1);
            char[] repeatingChar = new char[count];
            for (int i = 0; i < count; i++) {
                repeatingChar[i] = c;
            }
            aBuffer.replace(m.start(2) - 1, end + 2, new String(repeatingChar));
            m = repititionCount.matcher(aBuffer.toString());
        }

        // Now search through the string, looking for characters to
        // translate and removing escapre characters
        for (index = 0; index < aBuffer.length(); index++) {
            switch (aBuffer.charAt(index)) {
                case '\\':
                    // If the next character doesn't need escaping in the new
                    // mask then remove
                    // the escaping, else replace with the java escape character
                    // (')
                    switch (aBuffer.charAt(index + 1)) {
                        case '\\':
                        case 'a':
                        case '@':
                        case ')':
                        case '(':
                        case 'k':
                        case 'n':
                        case 'N':
                        case '&':
                        case '!':
                            aBuffer.deleteCharAt(index);
                            break;

                        default:
                            aBuffer.setCharAt(index, '\'');
                    }
                    break;

                case '?':
                    aBuffer.setCharAt(index, '*');
                    break;

                case 'a':
                    aBuffer.setCharAt(index, 'L');
                    break;

                case 'A':
                    aBuffer.setCharAt(index, 'U');
                    break;

                case '@':
                    aBuffer.setCharAt(index, '?');
                    break;

                case '&':
                    aBuffer.setCharAt(index, 'A');
                    break;

                case 'k':
                    UsageException errorVar = new UsageException("Java templates have no equivalent to the 'k' template character in Forte");
                    ErrorMgr.addError(errorVar);
                    throw errorVar;

                case 'n':
                    // n isn't really an A, but it's pretty close
View Full Code Here

                aLayout.setRows(0);
                aLayout.setColumns(this.wrapSize);
            }
        }
        else {
            UsageException errorVar = new UsageException("pWrapSize must be greater than 0");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

        this.setSelectedIndex(anIndex);
    }

    public void setSelectionModel(ListSelectionModel selectionModel) {
        if (selectionModel == null) {
            UsageException errorVar = new UsageException("selectionModel must be non null");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }

        /* Remove the forwarding ListSelectionListener from the old
View Full Code Here

              (usage != Constants.WU_VIEW) &&
              (usage != Constants.WU_QUERY) &&
              (usage != Constants.WU_USER1) &&
              (usage != Constants.WU_USER2) &&
              (usage != Constants.WU_USER3)){
            throw new UsageException("Window usage " + usage + " is unknown." );
          }
            this.usage = usage;
           
            for (UsageMap target : this.usageMapsOrdered) {
             
View Full Code Here

        }
        if (valueModel != null) {
            this.valueModel = valueModel;
        }
        else {
            UsageException errorVar = new UsageException("parameter valueModel is null");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

                aIndex = pData.length-1;
            }
            this.setSelectedIndex(aIndex);
        }
        else {
            UsageException errorVar = new UsageException("pData must be of type DisplayNode[]");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
    else {
        UsageException errorVar = new UsageException("pData must not be null");
        ErrorMgr.addError(errorVar);
        throw errorVar;
    }
}
View Full Code Here

        //  else {
        //    throw new UsageException("pData must be of type Array_Of_DisplayNode");
        //  }
    }
    else {
        UsageException errorVar = new UsageException("pData must not be null");
        ErrorMgr.addError(errorVar);
        throw errorVar;

    }
}
View Full Code Here

                    getterName,
                    setterName);
            wrappedBuffers.put(propertyName, wrappedBuffer);
        } else if    (!equals(getterName, wrappedBuffer.getterName)
                    || !equals(setterName, wrappedBuffer.setterName)) {
            throw new UsageException(
                    "You must not invoke this method twice "
                    + "with different getter and/or setter names.");
        }
        return wrappedBuffer.buffer;
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.UsageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.