Package org.beryl.gui.swing

Examples of org.beryl.gui.swing.IconElement


        if (index == -1)
          continue;
        int pos[] = getRowColumnForIndex(index);
        int xpos = convertColumnToX(pos[1]);
        int ypos = convertRowToY(pos[0]);
        IconElement element = (IconElement) model.getElementAt(index);
        ImageIcon icon = element.getIcon();
        String name = element.getText();
        int stringWidth = metrics.stringWidth(name);
        int iconHeight = icon.getIconHeight();
        int spacing = view.getIconTextSpacing();
        int center = ycell / 2 - (textHeight + iconHeight + spacing) / 2;
View Full Code Here


    y2 += view.getYCellSize();
    return new Rectangle(x1, y1, x2, y2);
  }

  private boolean checkBoundingBox(int x, int y, int index) {
    IconElement icon = (IconElement) view.getModel().getElementAt(index);
    int xcell = view.getXCellSize(), ycell = view.getYCellSize();
    int iconWidth = icon.getIcon().getIconWidth();
    int iconHeight = icon.getIcon().getIconHeight();
    int spacing = view.getIconTextSpacing();
    int stringWidth = metrics.stringWidth(icon.getText());
    int center = ycell / 2 - (textHeight + iconHeight + spacing) / 2;
    x = x % xcell;
    y = y % ycell;

    if (x > (xcell / 2 - iconWidth / 2)
View Full Code Here

TOP

Related Classes of org.beryl.gui.swing.IconElement

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.