Package javax.swing.text

Examples of javax.swing.text.View.paint()


        View v = getTextViewForTab(tabIndex);

        if (v != null) {
            // html
            v.paint(g, textRect);
        } else {
            // plain text
            int mnemIndex = tabPane.getDisplayedMnemonicIndexAt(tabIndex);
            FontMetrics    fm = SwingUtilities2.getFontMetrics(tabPane, g);
            title = SwingUtilities2.clipStringIfNecessary(tabPane, fm, title, textRect.width);
View Full Code Here


        // Draw the Text
        if (text != null) {
            View v = (View) c.getClientProperty(BasicHTML.propertyKey);
            if (v != null) {
                v.paint(g, textRect);
            } else {
                g.setColor(style.getColor(context, ColorType.TEXT_FOREGROUND));
                g.setFont(style.getFont(context));
                style.getGraphicsUtils(context).paintText(context, g, text, textRect.x, textRect.y, b.getDisplayedMnemonicIndex());
            }
View Full Code Here

        // Draw the Text
        if(text != null) {
       View v = (View) c.getClientProperty(BasicHTML.propertyKey);
       if (v != null) {
     v.paint(g, textRect);
       } else {
    paintText(g, b, textRect, text);
      }
  }
 
View Full Code Here

    }

    if (text != null && !text.equals("")) {
      View v = (View) c.getClientProperty(BasicHTML.propertyKey);
      if (v != null) {
        v.paint(g, textRect);
      } else {
        paintText(g, b, textRect, text);
      }
    }
  }
View Full Code Here

    View v = (View) c.getClientProperty(BasicHTML.propertyKey);
    g2d.setFont(f);

    this.delegate.updateBackground(g2d, b);
    if (v != null) {
      v.paint(g2d, textRect);
    } else {
      this.paintButtonText(g2d, b, textRect, text);
    }

    // Paint the Icon
View Full Code Here

        if(text != null && !text.equals("")) {
            // Once BasicHTML becomes public, use BasicHTML.propertyKey
            // instead of the hardcoded string below!
            View v = (View) c.getClientProperty("html");
            if (v != null) {
                v.paint(g, textRect);
            } else {
                int mnemIndex = b.getDisplayedMnemonicIndex();

                if(!model.isEnabled()) {
                    // *** paint the text disabled
View Full Code Here

            insets.top,
            size.width - (insets.left + insets.right) - 6 - accelSpacing,
            size.height - (insets.top + insets.bottom));
        View v = (View) c.getClientProperty(BasicHTML.propertyKey);
        if (v != null) {
            v.paint(g, paintTextR);
            accelBL = BasicHTML.getHTMLBaseline(v, paintTextR.width,
                                                  paintTextR.height);
        } else {
            g.setFont(font);
            SwingUtilities2.drawString(tip, g, tipText, paintTextR.x,
View Full Code Here

        // Draw the Text
        if(text != null && !text.equals("")) {
            View v = (View) c.getClientProperty(BasicHTML.propertyKey);
            if (v != null) {
               v.paint(g, textRect);
            } else {
               paintText(g, b, textRect, text);
            }
        }
View Full Code Here

        }

        if (text != null && !text.equals("")){
            View v = (View) c.getClientProperty(BasicHTML.propertyKey);
            if (v != null) {
                v.paint(g, textRect);
            } else {
                paintText(g, b, textRect, text);
            }
        }
View Full Code Here

        // Draw the Text
        if(text != null) {
            View v = (View) c.getClientProperty(BasicHTML.propertyKey);
            if (v != null) {
                v.paint(g, textRect);
            } else {
               int mnemIndex = b.getDisplayedMnemonicIndex();
               if(model.isEnabled()) {
                   // *** paint the text normally
                   g.setColor(b.getForeground());
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.