Examples of ImagePanel


Examples of org.jwildfire.swing.ImagePanel

      int x = OUTER_BORDER;
      for (int c = 0; c < cols; c++) {
        if (flameIdx < pFlames.size()) {
          // image
          final FlameFlatNode node = pFlames.get(flameIdx++);
          ImagePanel imgPanel;
          SimpleImage img = renderCache.getImage(node);
          if (img == null) {
            img = new SimpleImage(IMG_WIDTH, IMG_HEIGHT);
            img.fillBackground(0, 0, 0);
            imgPanel = new ImagePanel(img, 0, 0, img.getImageWidth());
            jobInfoLst.add(new RenderJobInfo(imgPanel, node, IMG_WIDTH, IMG_HEIGHT, x, y));
          }
          else {
            imgPanel = new ImagePanel(img, 0, 0, img.getImageWidth());
          }
          imgPanel.setImage(img);
          imgPanel.setLocation(x, y);
          imgPanel.setBorder(new LineBorder(deselectedCellColor, borderSize));
          pnlList.add(imgPanel);

          final int pnlIdx = pnlList.size() - 1;

          imgPanel.addMouseListener(new java.awt.event.MouseAdapter() {

            @Override
            public void mouseClicked(java.awt.event.MouseEvent e) {
              if (e.getClickCount() > 1 || e.getButton() != MouseEvent.BUTTON1) {
                nodeToEditor(node);
View Full Code Here

Examples of org.jwildfire.swing.ImagePanel

  }

  protected void selectCell(int pIndex) {
    for (int i = 0; i < pnlList.size(); i++) {
      ImagePanel pnl = pnlList.get(i);
      boolean sel = (i == pIndex);
      pnl.setBorder(new LineBorder(sel ? selectedCellColor : deselectedCellColor, borderSize));
    }
    imgRootPanel.invalidate();
    imgRootPanel.validate();
    selectedPnl = pIndex;
    enableControls();
View Full Code Here

Examples of org.jwildfire.swing.ImagePanel

          }
          else {
            Files.copy(srcFile.toPath(), dstFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
          }

          ImagePanel pnl = pnlList.get(selectedPnl);
          SimpleImage img = pnl.getImage();
          TextTransformer txt = new TextTransformer();
          txt.setText1(bMove ? "(moved)" : "(copied)");
          txt.setAntialiasing(true);
          txt.setColor(bMove ? Color.RED : Color.GRAY);
          txt.setMode(Mode.NORMAL);
          txt.setFontStyle(FontStyle.BOLD);
          txt.setFontName("Arial");
          txt.setFontSize(24);
          txt.setHAlign(HAlignment.CENTRE);
          txt.setVAlign(VAlignment.CENTRE);
          txt.transformImage(img);

          pnl.invalidate();
          pnl.repaint();

          enableControls();
        }
      }
      catch (Exception ex) {
View Full Code Here

Examples of org.jwildfire.swing.ImagePanel

          File file = new File(node.getFilename());
          if (!file.delete()) {
            throw new Exception("Could not delete file");
          }
          node.setRemoved(false);
          ImagePanel pnl = pnlList.get(selectedPnl);
          SimpleImage img = pnl.getImage();

          TextTransformer txt = new TextTransformer();
          txt.setText1("(deleted)");
          txt.setAntialiasing(true);
          txt.setColor(Color.RED);
          txt.setMode(Mode.NORMAL);
          txt.setFontStyle(FontStyle.BOLD);
          txt.setFontName("Arial");
          txt.setFontSize(24);
          txt.setHAlign(HAlignment.CENTRE);
          txt.setVAlign(VAlignment.CENTRE);
          txt.transformImage(img);

          pnl.invalidate();
          pnl.repaint();
        }
      }
      catch (Exception ex) {
        errorHandler.handleError(ex);
      }
View Full Code Here

Examples of org.jwildfire.swing.ImagePanel

      height /= 2;
    }
    image = new SimpleImage(width, height);
    image.getBufferedImg().setAccelerationPriority(1.0f);
    image.fillBackground(prefs.getTinaRandomBatchBGColorRed(), prefs.getTinaRandomBatchBGColorGreen(), prefs.getTinaRandomBatchBGColorBlue());
    ImagePanel imagePanel = new ImagePanel(image, 0, 0, image.getImageWidth());
    imagePanel.setSize(image.getImageWidth(), image.getImageHeight());
    imagePanel.setPreferredSize(new Dimension(image.getImageWidth(), image.getImageHeight()));

    imageScrollPane = new JScrollPane(imagePanel);
    imageScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    imageScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
View Full Code Here

Examples of org.projectforge.web.wicket.flowlayout.ImagePanel

    final GanttChart ganttChart = createGanttChart();
    final Component oldGanttImage = ganttImage;
    if (ganttChart != null) {
      final Document document = ganttChart.create();
      if (document != null) {
        ganttImage = new ImagePanel(form.imagePanel.newChildId(), new BatikImage(ImagePanel.IMAGE_ID, document, getGanttChartStyle()
            .getWidth()));
      } else {
        ganttImage = null;
      }
    } else {
View Full Code Here

Examples of org.sunflow.system.ImagePanel

  private JPanel getLeftSplitPanel() {
    if (leftSplitPanel == null) {
      leftSplitPanel = new JPanel();
      leftSplitPanel.setLayout(new BorderLayout());
      imagePanel = new ImagePanel();
      leftSplitPanel.add(imagePanel, BorderLayout.CENTER);
    }
    return leftSplitPanel;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.