Package Framework

Examples of Framework.UsageException$qq_Resolver


        case Constants.RA_TOP:
        case Constants.RA_BOTTOM:
            this.rowAlignment = pAlignment;
            break;
        default:
            UsageException errorVar = new UsageException("Row alignment passed invalid value of " + pAlignment);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here


                if (gbc.row == -1 || gbc.column == -1) {
                    gbc.row = 0;
                    gbc.column = 0;
                }
                else if (gbc.row < 0 || gbc.column < 0) {
                    UsageException errorVar = new UsageException("gridx and gridy should be >= 0, not row = " + gbc.row + ", column = " + gbc.column);
                    ErrorMgr.addError(errorVar);
                    throw errorVar;
                }
                else if (gbc.row >= rows || gbc.column >= columns) {
                  // TF:28/04/2008:if ignoreCollapse is true, we're doing the initial insert. In this case we don't
                  // have the rows and columns necessarily set, so we need to add the components in by expanding the grid
                  if (ignoreCollapse) {
                    // TF:09/05/2008:JIRA JCT-545:Since this is the initial insert, we must obey the
                    // constraints as posted. This means that we'll get the correct row and column
                    // even if a row or column appears empty when this element is inserted (because
                    // another element might be inserted later to make the empty row/column populated)
//                    if (isCollapsed()) {
//                      if (gbc.row >= rows) {
//                        gbc.row = rows;
//                      }
//                      if (gbc.column >= columns) {
//                        gbc.column = columns;
//                      }
//                    }
                    for (int i = rows; i <= gbc.row; i++) {
                      rowWeights.add(i, new Integer(0));
                    }
                    for (int i = columns; i <= gbc.column; i++) {
                      columnWeights.add(i, new Integer(0));
                    }
                    rows = Math.max(rows, gbc.row + 1);
                    columns = Math.max(columns, gbc.column + 1);
                  }
                  else {
                      // Using the replace policy, we never insert a column outside the grid
                    // TF:10/08/2008:JCT-582:If the grid field is empty, we allow the replace
                    if (parent.getComponentCount() == 0) {
                      fallThroughToExpand = true;
                    }
                    else {
                      return false;
                    }
                  }
                }
                if (!fallThroughToExpand) {
                  JComponent comp = parent.getChildInCell(gbc.row + 1, gbc.column + 1);
                  if (comp != null) {
                      parent.remove(comp);
                  }
                  break;
                }
               
        case Constants.IP_EXPAND:
            // If the row or column is -1, we shuffle everything up and across
            if (gbc.row == -1 || gbc.column == -1) {
                gbc.row = 0;
                gbc.column = 0;
                for (Component thisChild : parent.getComponents()) {
                    if (thisChild != newOne) {
                        GridCell effective = findConstraints(thisChild);
                        effective.row++;
                        effective.column++;
                    }
                }
                rows++;
                columns++;
                rowWeights.add(0, new Integer(0));
                columnWeights.add(0, new Integer(0));
            }
            else if (gbc.column < 0 || gbc.row < 0) {
                UsageException errorVar = new UsageException("gridx and gridy should be >= 0, not gridx = " + gbc.column + ", gridy = " + gbc.row);
                ErrorMgr.addError(errorVar);
                throw errorVar;
            }
            else if (gbc.column >= columns || gbc.row >= rows) {
                // If we need to collapse the columns, update the value passed so that it's the
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

      docRoot = DomFactory.newDocument(new FileInputStream(file));
          // TF:23/06/2008:Remember "this" document so we can return it as the real owner.
      docRoot.setUserData(THIS_DOCUMENT_KEY, this, null);
    }
    catch (FileNotFoundException e) {
            UsageException errorVar = new UsageException("Unable to open file " + file.getAbsolutePath() + " as stream");
            ErrorMgr.addError(errorVar);
            throw errorVar;
    }
    }
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

     * someMethod<p>
     * <p>
     */
    public void someMethod() {
        try {
            UsageException bob = new UsageException();
            bob.setMessageText(new TextData());
            GenericException.getMessageText(bob).replaceParameters("Hello %1", new TextData("sailor"));
            ErrorMgr.addError(bob);
            throw bob;
   
        }
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }
View Full Code Here

TOP

Related Classes of Framework.UsageException$qq_Resolver

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.