Package net.helipilot50.stocktrade.displayproject.plaf

Examples of net.helipilot50.stocktrade.displayproject.plaf.ForteMenuLayout


                comp.getParent().setPreferredSize(null);
            }
            invalidateLayout(comp.getParent());
        }
        else {
            UsageException errorVar = new UsageException("constraints must be an instance of grid bag constraints or grid cell");
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here


     * will be thrown.
     * @param pForce whether non-empty columns should be deleted or not.
     */
    public void deleteColumn(GridField pField, int pPosition, boolean pForce) {
        if (pPosition < 0 || pPosition >= columns) {
            UsageException errorVar = new UsageException("pPosition must be in the range (0->" + (columns-1));
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        int count = pField.getComponentCount();
        // Disable the collapse-on-delete feature temporarily, otherwise the logic becomes more
View Full Code Here

     * will be thrown.
     * @param pForce whether non-empty rows should be deleted or not.
     */
    public void deleteRow(GridField pField, int pPosition, boolean pForce) {
        if (pPosition < 0 || pPosition >= rows) {
            UsageException errorVar = new UsageException("pPosition must be in the range (0->" + (rows-1));
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        int count = pField.getComponentCount();
        // Disable the collapse-on-delete feature temporarily, otherwise the logic becomes more
View Full Code Here

        case Constants.CA_LEFT:
        case Constants.CA_RIGHT:
            this.colAlignment = pAlignment;
            break;
        default:
            UsageException errorVar = new UsageException("Column alignment passed invalid value of " + pAlignment);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
    }
View Full Code Here

        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

              // There's one other possibility -- it just hasn't been injected yet. (eg if
              // the client accesses the database directly)
              result = (DBConnectionManager)ServiceObjectRegistry.getService(dataSourceName, DBConnectionManager.class);
              result.setDataSourceName(dataSourceName);
              if (result == null) {
                  throw new UsageException("Data source " + dataSourceName + " has not been injected into the DBConnectionMgr");
              }
          }
        }
        return result;
    }
View Full Code Here

   * @return a DBDatabaseDesc object which describes a collection of database
   *         tables.
   */
    public DBDatabaseDesc getDatabaseDesc(String tableNamePattern, int info){
      if ((info & Constants.DB_IN_COLUMNINFO) == 0) {
        throw new UsageException("You must specify DB_IN_COLUMNINFO in the info parameter if you specify either DB_IN_KEYINFO or DB_IN_FOREIGNKEYINFO.",
            SP_ER_PARAMETERERROR, SP_ER_USER, UsageException.qq_Resolver.cMESSAGE_REASONCODE_SEVERITY);
    }
        Connection connection = null;
        try {
            connection = this.getConnection();
View Full Code Here

            ResultSet rs = connection.getMetaData().getTables(null, null, pName, null);
            while (rs.next()) {
                tableNames.add(new TextData(rs.getString(3)));
            }
        } catch (SQLException e) {
            throw new UsageException(e);
        } finally {
            releaseConnection(connection);
        }
        return tableNames;
    }
View Full Code Here

        try {
            ObjectName objectName  = SystemAgent.getStrategy().getObjectName(this, "NodeAgent_" + FrameworkUtils.getNodeName().toString());
            this.setObjectName(objectName);

        } catch (MalformedObjectNameException e) {
            UsageException errorVar = new UsageException("Cannot create NodeAgent", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        } catch (NullPointerException e) {
            UsageException errorVar = new UsageException("Cannot create NodeAgent", e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
        }
        this.setState(Constants.SM_ONLINE);
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.plaf.ForteMenuLayout

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.