Package net.helipilot50.stocktrade.displayproject

Examples of net.helipilot50.stocktrade.displayproject.GridField$RowJustifyWeightFilter


   *            The Background colour.
   * @return The created GridField
   */
  public static GridField newGridField(String name, int frameWeight,
      String caption, Color bc) {
    GridField gf = new GridField(name);
    FrameWeight.set(gf, frameWeight);
    Caption.set(gf, caption);
    return gf;
  }
View Full Code Here


   *            not translated at this stage
   * @return The created GridField
   */
  public static GridField newGridField(String name, int frameWeight,
      String caption, Color bc, int fontStyle) {
    GridField gf = new GridField(name);
    FrameWeight.set(gf, frameWeight);
    Caption.set(gf, caption);

    return gf;
  }
View Full Code Here

      Container parent,
      int row,
      int vertDividerWeight,
      int widthPolicy) {
   
    GridField gf = new GridField();
    gf.setCellLeftMargin(cellLeftMargin);
    gf.setCellRightMargin(cellRightMargin);
    gf.setHorzDividerWeight(horzDividerWeight);
    gf.setVertDividerWeight(vertDividerWeight);
    gf.setMinWidth(minWidthInPixels);

    Column.set(gf, column);
    Row.set(gf, row);
    FrameWeight.set(gf, frameWeight);
    FieldWidgetGravity.set(gf, gravity);
View Full Code Here

              ((JComponent)pParent).doLayout();
            }
            return;
        }
        if (pParent instanceof GridField) {
            GridField gf = (GridField) pParent;
            gf.add(pChild);
        } else {
            pParent.add(pChild);
            pParent.setComponentZOrder(pChild, 0);
        }
        //PM:28/4/08 added additional null check
View Full Code Here

    }

    public static GridField get(Component comp){
        Component target = comp;
        TableColumnModel colModel = null;
        GridField gf = new GridField();
        ArrayFieldTitleGrid action = ActionMgr.getAction(comp, ArrayFieldTitleGrid.class);
        if (action != null) {
            return action.getValue();
        }
        if (comp instanceof JScrollPane){ // if its a scroll pane
            JTableHeader header = (JTableHeader)((JScrollPane)comp).getColumnHeader().getComponent(0);
            colModel = header.getColumnModel();
        } else { // must be a JTable
            JTable table = (JTable)target;
            colModel = table.getColumnModel();
        }
        for (int col = 0; col < colModel.getColumnCount(); col ++){
            ArrayColumn ac = (ArrayColumn)colModel.getColumn(col);
            DefaultTableCellRenderer cr = (DefaultTableCellRenderer)ac.getHeaderRenderer();
            if (cr == null){
                cr = new DefaultTableCellRenderer();
                cr.setText(" ");
            }
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.anchor = GridBagConstraints.CENTER;
            gbc.fill = GridBagConstraints.NONE;
            gbc.gridx = col;
            gbc.gridy = 0;
            gf.add(cr, gbc);
        }
        return gf;
    }
View Full Code Here

                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here

        return target;
    }

    public static JTree cloneJTree(JTree source) {
        DisplayNode root = clone((DisplayNode) source.getModel().getRoot(), true);
        TreeViewModel dtm = new TreeViewModel(root);
        JTree target = new JTree(dtm);
        CloneHelper.cloneComponent(source, target, new String[] {"UI", // class javax.swing.plaf.TreeUI
                "UIClassID", // class java.lang.String
                "accessibleContext", // class javax.accessibility.AccessibleContext
                "actionMap", // class javax.swing.ActionMap
View Full Code Here

     * indicies are 1-based. If the collapsed attribute is true,
     * this method does nothing. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void insertColumn(final int position) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".insertColumn(" + position + ")";
            }
            @Override
View Full Code Here

     * Add a row into the model. If the collapsed attribute is true,
     * this method does nothing. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void insertRow(final int position) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".insertRow(" + position + ")";
            }
            @Override
View Full Code Here

     * return the weight of the column in the grid field. This method is thread-safe.
     * @param row
     * @return
     */
    public int getColumnJustifyWeight(int column) {
        PendingAction action = ActionMgr.getAction(new ColumnJustifyWeightFilter(column));
        if (action != null) {
            return ((ColumnJustifyWeight)action).weight;
        }
        Integer val = layout.columnWeights.get(column);
        return val == null ? 0 : val.intValue();
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.GridField$RowJustifyWeightFilter

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.