Package net.helipilot50.stocktrade.framework

Examples of net.helipilot50.stocktrade.framework.ImageData


        }
    }

    public ImageData getImageData(String pColumnName) {
        try {
            ImageData id = new ImageData(resultSet.getBytes(pColumnName));
            return id;
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here


    }
    public Object getCellEditorValue() {
        return this.picture.getImageValue();
    }
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        ImageData image = (ImageData)value;
        picture.setImageValue(image);
        return picture;
    }
View Full Code Here

    this.setOpaque(!transparent);
  }

  private void refreshImage() {
    if ((this.imageValue == null) && (this.getIcon() != null)) {
      this.imageValue = new ImageData((ImageIcon) this.getIcon());
    }
    ImageIcon icon = new ImageIcon(imageValue.getValue());

    // TF:9/12/07:Added safety check
    if (getWidth() > 0 && getHeight() > 0) {
View Full Code Here

                Object objValue = AlignedCellRenderer.expressionExecute(value, this.methodName, ".");

                int iconHeight = 0;
                if (objValue != null && objValue instanceof ImageData) {
                    // This is a column defined as an image, it can contain no text
                    ImageData id = (ImageData)objValue;
                    renderer.setIcon(id.asScaledIconImage(ICON_WIDTH, ICON_HEIGHT));
                    iconHeight = ICON_HEIGHT;
                }
                else {
                    // display icon
                    // TF:24/7/07: In Forte, if there was no selected icon, the small icon would display, even if selected.
                    Icon icon = null;
                    ImageData image = ((DisplayNode)value).getDVSmallIcon();
                    // COLET 20/01/2009 : Check if the selected image is valid by checking isNull(). If its empty, use the small icon. This is what Forte did.
                    ImageData selectedImage = ((DisplayNode)value).getDVSelectedIcon();
                    if (isSelected && selectedImage != null && !selectedImage.isNull()) {
                        image = selectedImage;
                    }

                    // We have an icon
                    if(image != null) {
View Full Code Here

        }
        BufferedImage img = new BufferedImage(componentSize.width, componentSize.height, BufferedImage.TYPE_INT_RGB);
        Graphics2D grap = img.createGraphics();
        grap.fillRect(0, 0, img.getWidth(), img.getHeight());
        win.paint(grap);
        ImageData id = new ImageData(img);
        if (!includeFrame){
            ((JComponent)win).setBorder(oldBorder);
        }
        return id;
    }
View Full Code Here

              Dimension imageSize = PaletteList.this.getImageSize(elements);

              for (Iterator<ListElement> it = elements.iterator(); it.hasNext();) {
                  ListElement le = it.next();
                  if (le.getImageValue() != null && !le.getImageValue().isNull()) {
                      ImageData id = le.getImageValue();
                      ImageIcon thisImage = new ImageIcon(id.getValue());
                      JToggleButton thisButton = new JToggleButton(PaletteList.this.makeTransparentIcon(thisImage));
                      thisButton.setPreferredSize(imageSize);
                      thisButton.setMinimumSize(imageSize);
                      thisButton.setMaximumSize(imageSize);
                      thisButton.addActionListener(new ActionListener() {
View Full Code Here

    protected Dimension getImageSize(Array_Of_ListElement<ListElement> pElements) {
        int width = 0;
        int height = 0;
        for (Iterator<ListElement> it = pElements.iterator(); it.hasNext(); ) {
            ListElement thisElement = it.next();
            ImageData thisImage = thisElement.getImageValue();
            if (thisImage != null) {
                Image anImage = thisImage.getValue();
                // Force this image to be fully realized
                ImageIcon i = new ImageIcon(anImage);
                int thisWidth = i.getIconWidth();
                if (thisWidth > width) {
                    width = thisWidth;    
View Full Code Here

        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        Transferable contents = clipboard.getContents(null);
        if (contents != null) {
            try {
                if (pObjectDataType == Constants.SD_IMAGE && contents.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                    result = new ImageData((Image)contents.getTransferData(DataFlavor.imageFlavor));
                }
                else if (pObjectDataType == Constants.SD_TEXT && contents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                    result = new TextData((String)contents.getTransferData(DataFlavor.stringFlavor));
                }
            }
View Full Code Here

      this.imageValue = null;
      this.setIcon_internal(null);
    }
    else {
      if (imageValue == null) {
        imageValue = new ImageData();
        // Associate this button listener with the value change event
        imageValue.addPropertyChangeListener("value", this);
      }
      this.imageValue.setValue((ImageIcon)icon);
      // No need to call setIcon_internal here, as this will trigger the property change event
View Full Code Here

    public static ImageData get(Component comp){
        WindowSmallIconImage action = ActionMgr.getAction(comp, WindowSmallIconImage.class);
        if (action != null) {
            return action.getValue();
        }
        return new ImageData(((JFrame)comp).getIconImage());
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.framework.ImageData

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.