Package net.helipilot50.stocktrade.displayproject.controls

Examples of net.helipilot50.stocktrade.displayproject.controls.Panel


     * rows is more than the passed value, the number of rows will be
     * set to the number of rows used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setRows(final int pRows) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setRows(" + pRows + ")";
            }
            @Override
View Full Code Here


     * columns is more than the passed value, the number of columns will be
     * set to the number of columns used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setColumns(final int pColumns) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setColumns(" + pColumns + ")";
            }
            @Override
View Full Code Here

        // TF:8/8/07:Made a shallow clone in case there is a really big object attached to the list element
        Array_Of_ListElement<ListElement> clonedList = CloneHelper.clone(les, false);
        Object currentValue = this.list.getValue();
        ListElement valueToReselect = null;
        if (currentValue instanceof ListElement && clonedList != null && this.list.getSelectionHolder() instanceof TypeAwareValueModel) {
          TypeAwareValueModel tavm = (TypeAwareValueModel)this.list.getSelectionHolder();
          // We need to find an item in the new list which is the same as an item in the old list,
          // depending on the type being considered. For example, if the list is mapped to an int,
          // we need to find an element in the new list with the same IntegerValue.
          Class<?> clazz = tavm.getValueType();
          ListElement currentSelection = (ListElement)currentValue;
          for (ListElement item : clonedList) {
            if (clazz.equals(Integer.TYPE) ||
                clazz.equals(Short.TYPE) ||
                NumericData.class.isAssignableFrom(clazz) ||
View Full Code Here

      }
      else if (list.getSelectionHolder() == null) {
        requiresDefault = true;
      }
      else {
        ValueModel model = list.getSelectionHolder();
        if (model instanceof TypeAwareValueModel) {
          if (DataValue.class.isAssignableFrom(((TypeAwareValueModel)model).getValueType())) {
            requiresDefault = false;
          }
          else {
            requiresDefault = true;
          }
        }
        else {
          requiresDefault = (model.getValue() == null);
        }
      }
      if (requiresDefault) {
        // TF:05/11/2008:Fixed this up so it actually sets the underlying model
        getSelectionModel().setSelectionInterval(0, 0);
View Full Code Here

    //PM:13/6/08 changed to return type of Panel to unsure it is a compound field
    public static Panel getForm(JFrame win) {
                try {
                Expression expr = new Expression(win, "getForm", new Object[0]);
                    expr.execute();
                    Panel form = ((Panel)expr.getValue());
                    return form;
            } catch (Exception e) {
                return null;
            }
View Full Code Here

   * Forte.
   *
   * @return A <code>Panel</code> which represents the Form
   */
  public static Panel newForm() {
    Panel gf = new Panel();
    gf.setName("Form");
    gf.setDoubleBuffered(true);
    gf.setFocusable(false);
    gf.setBackground(null);
    // TF:19/06/2008:Added the instantiation of the layout manager here
    gf.setLayout(new WindowFormLayout());

    gf.setFocusTraversalPolicyProvider(true);
    gf.setFocusTraversalPolicy(new ForteLayoutFocusTraversalPolicy()); // CraigM:01/09/2008 - Moved code into special class.

    return gf;
  }
View Full Code Here

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

    gf.setOpaque(true);
    gf.setBackground(null);

    return gf;
  }
View Full Code Here

   *            The Background colour.
   * @return The created <code>Panel</code>
   */
  public static Panel newPanel(String name, int frameWeight, String caption,
      Color bc) {
    Panel gf = newPanel(name);
    FrameWeight.set(gf, frameWeight);
    Caption.set(gf, caption);
    gf.setOpaque(true);
    gf.setBackground(null);
    // TF:21/8/07:When we add components to the panel we have to cater for
    // the border offsets. However,
    // because this component isn't always created on the GUI thread the
    // border may not be set prior to
    // us adding the components because it's in the pending action queue.
View Full Code Here

   * @return The created <code>Panel</code>
   */
  public static Panel newPanel() {
    // TF:9/11/07:Refactored this method to initialise the state properly
    // for coded widgets, instead of declared widgets
    Panel result = newPanel((String) null);
    WidgetState.set(result, Constants.FS_UPDATE);
    return result;
  }
View Full Code Here

   *            widget. Y is measured in mils from top to bottom.
   * @return The created <code>Panel</code>
   */
  public static Panel newPanel(int x, int y, int height, int width,
      int frameWeight, Container parent) {
    Panel jp = newPanel((String) null);
    Widget.configure(jp, x, y, width, height);
    FrameWeight.set(jp, frameWeight);
    Parent.set(jp, parent);
    jp.setBackground(null);
    return jp;
  }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.controls.Panel

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.