Examples of Painter


Examples of org.jdesktop.swingx.painter.Painter

     * @see #isBackgroundPainted()
     * @see #setBackgroundPainted(boolean)
     */
    protected void paintBackground(Graphics2D g2) {
        if (isBackgroundPainted()) {
            Painter p = getBackgroundPainter();
            if (p != null) {
                p.paint(g2, this, getWidth(), getHeight());
            } else {
                g2.setColor(getBackground());
                g2.fill(g2.getClipBounds());
            }
        }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

    public Painter<JXButton> getBackgroundPainter() {
        return bgPainter;
    }

    public void setBackgroundPainter(Painter<JXButton> p) {
        Painter old = getBackgroundPainter();
        this.bgPainter = p;
        firePropertyChange("backgroundPainter", old, getBackgroundPainter());
        repaint();
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

    public Painter<JXButton> getForegroundPainter() {
        return fgPainter;
    }

    public void setForegroundPainter(Painter<JXButton> p) {
        Painter old = getForegroundPainter();
        this.fgPainter = p;
        firePropertyChange("foregroundPainter", old, getForegroundPainter());
        repaint();
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

     * can be wrapped by using a CompoundPainter.
     *
     * @param painter
     */
    public void setForegroundPainter(Painter painter) {
        Painter old = this.getForegroundPainter();
        if (painter == null) {
            //restore default painter
            initPainterSupport();
        } else {
            this.foregroundPainter = painter;
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

     *
     * @param p the new painter
     * @see #getBackgroundPainter()
     */
    public void setBackgroundPainter(Painter p) {
        Painter old = getBackgroundPainter();
        backgroundPainter = p;
        firePropertyChange("backgroundPainter", old, getBackgroundPainter());
        repaint();
    }
View Full Code Here

Examples of org.jdesktop.swingx.painter.Painter

   *
   * @param textComponent
   * @return the background painter of the text component
   */
  public static Painter getBackgroundPainter(JTextComponent textComponent) {
      Painter painter = (Painter) textComponent.getClientProperty(BACKGROUND_PAINTER);
     
      if (painter == null) {
          painter = Painters.EMPTY_PAINTER;
      }
     
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.