Package net.helipilot50.stocktrade.displayproject.controls

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


     * @return
     */
    private int virtualToRealY(Component comp) {
      Container container = comp.getParent();
      if (container instanceof Panel && comp instanceof JComponent) {
        Panel panel = (Panel)container;
        Insets insets = panel.getInsets();
        Integer virtualYObj = (Integer)((JComponent)comp).getClientProperty("virtualY");
        if (virtualYObj != null) {
          int virtualY = virtualYObj.intValue() + insets.top + panel.getMargin();
          return virtualY;
        }
      }
    return comp.getY();
    }
View Full Code Here


     * @return
     */
    private int realToVirtualX(JComponent comp) {
      Container container = comp.getParent();
      if (container instanceof Panel) {
        Panel panel = (Panel)container;
        Insets insets = panel.getInsets();
        return comp.getX() - insets.left - panel.getMargin();
      }
    return comp.getX();
    }
View Full Code Here

     * @return
     */
    private int realToVirtualY(JComponent comp) {
      Container container = comp.getParent();
      if (container instanceof Panel) {
        Panel panel = (Panel)container;
        Insets insets = panel.getInsets();
        return comp.getY() - insets.top - panel.getMargin();
      }
    return comp.getY();
    }
View Full Code Here

              else {
                ((JPopupMenu)comp).setPreferredSize(new Dimension(0, 0));
              }
            }
            else if (comp instanceof Panel){
              Panel jp = ((Panel) comp);
                /*
                 * if the JPanel was or is part of a JTabbedPane
                 */
             
              _log.debug("Panel "+ jp.getCaption() + " parent: " + ((parent == null) ? "null" : parent.getClass().getName()));
                if (parent instanceof TabFolder ) {
                  if (value) {
                    ((TabFolder)parent).showTab(jp); //PM:14/01/2009:moved functionality to TabFolder
                    _log.debug("Tab: "+jp.getCaption()+" is now visible");
                  } else {
                    ((TabFolder)parent).hideTab(jp);//PM:14/01/2009:moved functionality to TabFolder
                    _log.debug("Tab: "+jp.getCaption()+" is now hidden");
                  }
                } else {
                  comp.setVisible(value);
                }
            } else if (comp instanceof JPanel) {
View Full Code Here

          }
        }
        else {
          ListSelectionModel model = getSelectionModel();
          if (!(model instanceof ReadOnlyButtonModel)) {
            this.setSelectionModel(new ReadOnlyListSelectionModel(model));
          }
        }
        this.isCalledFromSetEditable = false;
        this.firePropertyChange("editable", !editable, editable);
      }
View Full Code Here

        for (ActionListener listener : listeners){
            if (listener instanceof PrintActionListener){
                target.addActionListener(new PrintActionListener(((PrintActionListener)listener).getWindow()));
            } else
            if (listener instanceof AboutMenuListener){
                target.addActionListener(new AboutMenuListener());
            }
        }
        CloneHelper.cloneClientProperties(source, target);
        return target;
    }
View Full Code Here

        target.setMnemonic(source.getMnemonic());
        target.setAccelerator(source.getAccelerator());
        ActionListener[] listeners = source.getActionListeners();
        for (ActionListener listener : listeners){
            if (listener instanceof PrintActionListener){
                target.addActionListener(new PrintActionListener(((PrintActionListener)listener).getWindow()));
            } else
            if (listener instanceof AboutMenuListener){
                target.addActionListener(new AboutMenuListener());
            }
        }
View Full Code Here

        this.editor = editor;
       
        // Wrap the cell editor in an ArrayFieldCellEditor to handle JTable sizing issues
        // TF:04/05/2009:If we don't have an editor (eg a listview) then we don't perform this code
        if (editor != null) {
          this.setCellEditor(new ArrayFieldCellEditor(editor));
        }
    }
View Full Code Here

        if (renderer instanceof AlignedCellRenderer) {
          this.setCellRenderer(renderer);
        }
        // For ArrayFields, wrap the cell renderer in an ArrayFieldCellRenderer to handle JTable sizing issues
        else {
          this.setCellRenderer(new ArrayFieldCellRenderer(renderer));
        }
    }
View Full Code Here

              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
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.