Package javax.swing

Examples of javax.swing.Icon.paintIcon()


          icn = icnNormal;
        }
      } else {
        icn = icnDisabled;
      }
      icn.paintIcon( this, g, 0, 0 );
//System.err.println( "GAGA" );
    }
  }
 
  private static class TempFocusTracker
View Full Code Here


        icn = icnNormal;
      }
    } else {
      icn = icnDisabled;
    }
    icn.paintIcon( this, g, 4, 2 );
  }

  private static class ModificationIcon
  implements Icon
  {
View Full Code Here

        icn = icnNormal;
      }
    } else {
      icn = icnUnfocussed;
    }
    icn.paintIcon( this, g, ((getWidth() - 24) >> 1) + 2, ((getHeight() - 24) >> 1) + 2 );
  }
}
View Full Code Here

                    }

                }
            }
            if (i != null) {
                i.paintIcon(context.getDestination(), g, x + 2, y + 2);
            } else {
                super.paintIcon(context, x, y, attrs);
            }
        }
    }
View Full Code Here

                    g.setColor(Color.darkGray);
                    g.fillRect(x, y, ICON_WIDTH, ICON_HEIGHT);
                }
                Icon icon = tool.getIcon();
                if (icon != null) {
                    icon.paintIcon(this, g, x, y);
                }

                if (tool.equals(current)) {
                    GraphicsUtil.switchToWidth(g, 2);
                    g.setColor(Color.black);
View Full Code Here

        if (painter.getGateShape() == AppPreferences.SHAPE_SHAPED) {
            icon = ICON_SHAPED;
        } else {
            icon = ICON_RECTANGULAR;
        }
        icon.paintIcon(painter.getDestination(), painter.getGraphics(), 2, 2);
    }

    @Override
    public void paintGhost(InstancePainter painter) {
        Value pull = getPullValue(painter.getAttributeSet());
View Full Code Here

    public void paintIcon(ComponentDrawContext c, int x, int y) {
        FactoryDescription desc = description;
        if (desc != null && !desc.isFactoryLoaded()) {
            Icon icon = desc.getIcon();
            if (icon != null) {
                icon.paintIcon(c.getDestination(), c.getGraphics(), x + 2, y + 2);
                return;
            }
        }

        ComponentFactory source = getFactory();
View Full Code Here

    @Override
    public void paintIcon(InstancePainter painter) {
        Object type = painter.getAttributeValue(ATTR_TYPE);
        Icon icon = type == TYPE_N ? ICON_N : ICON_P;
        icon.paintIcon(painter.getDestination(), painter.getGraphics(), 2, 2);
    }

    @Override
    public void paintInstance(InstancePainter painter) {
        drawInstance(painter, false);
View Full Code Here

                paintShapeForVertex(rc, v, s);
            }
            if(icon != null) {
                int xLoc = (int) (x - icon.getIconWidth()/2);
                int yLoc = (int) (y - icon.getIconHeight()/2);
                icon.paintIcon(rc.getScreenDevice(), g.getDelegate(), xLoc, yLoc);
            }
        }
    }
   
    /**
 
View Full Code Here

            if(icon != null) {
           
                    BufferedImage image = new BufferedImage(icon.getIconWidth(),
                            icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
                    Graphics2D ig = image.createGraphics();
                    icon.paintIcon(null, ig, 0, 0);
                    int imageWidth = image.getWidth(null);
                    int imageHeight = image.getHeight(null);
                   
                    int xLoc = (int) (x - imageWidth / 2);
                    int yLoc = (int) (y - imageHeight / 2);
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.