Examples of TextBlock


Examples of org.jfree.text.TextBlock

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        CategoryTick t1 = new CategoryTick("C1", new TextBlock(),
                TextBlockAnchor.CENTER, TextAnchor.CENTER, 1.5f);
        CategoryTick t2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
View Full Code Here

Examples of org.jfree.text.TextBlock

                }
                Rectangle2D area = new Rectangle2D.Double(x0, y0, (x1 - x0),
                        (y1 - y0));
                Point2D anchorPoint = RectangleAnchor.coordinates(area,
                        position.getCategoryAnchor());
                TextBlock block = tick.getLabel();
                block.draw(g2, (float) anchorPoint.getX(),
                        (float) anchorPoint.getY(), position.getLabelAnchor(),
                        (float) anchorPoint.getX(), (float) anchorPoint.getY(),
                        position.getAngle());
                Shape bounds = block.calculateBounds(g2,
                        (float) anchorPoint.getX(), (float) anchorPoint.getY(),
                        position.getLabelAnchor(), (float) anchorPoint.getX(),
                        (float) anchorPoint.getY(), position.getAngle());
                if (plotState != null && plotState.getOwner() != null) {
                    EntityCollection entities
View Full Code Here

Examples of org.jfree.text.TextBlock

            int categoryIndex = 0;
            Iterator iterator = categories.iterator();
            while (iterator.hasNext()) {
                Comparable category = (Comparable) iterator.next();
                g2.setFont(getTickLabelFont(category));
                TextBlock label = createLabel(category, l * r, edge, g2);
                if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
                    max = Math.max(max, calculateTextBlockHeight(label,
                            position, g2));
                }
                else if (edge == RectangleEdge.LEFT
View Full Code Here

Examples of org.jfree.text.TextBlock

     *
     * @return A label.
     */
    protected TextBlock createLabel(Comparable category, float width,
                                    RectangleEdge edge, Graphics2D g2) {
        TextBlock label = TextUtilities.createTextBlock(category.toString(),
                getTickLabelFont(category), getTickLabelPaint(category), width,
                this.maximumCategoryLabelLines, new G2TextMeasurer(g2));
        return label;
    }
View Full Code Here

Examples of org.jfree.text.TextBlock

        double verticalLinkRadius = state.getLinkArea().getHeight() / 2.0;
        for (int i = 0; i < leftKeys.getItemCount(); i++) {
            String label = this.labelGenerator.generateSectionLabel(
                    this.dataset, leftKeys.getKey(i));
            if (label != null) {
                TextBlock block = TextUtilities.createTextBlock(label,
                        this.labelFont, this.labelPaint, maxLabelWidth,
                        new G2TextMeasurer(g2));
                TextBox labelBox = new TextBox(block);
                labelBox.setBackgroundPaint(this.labelBackgroundPaint);
                labelBox.setOutlinePaint(this.labelOutlinePaint);
View Full Code Here

Examples of org.jfree.text.TextBlock

        for (int i = 0; i < keys.getItemCount(); i++) {
            String label = this.labelGenerator.generateSectionLabel(
                    this.dataset, keys.getKey(i));

            if (label != null) {
                TextBlock block = TextUtilities.createTextBlock(label,
                        this.labelFont, this.labelPaint, maxLabelWidth,
                        new G2TextMeasurer(g2));
                TextBox labelBox = new TextBox(block);
                labelBox.setBackgroundPaint(this.labelBackgroundPaint);
                labelBox.setOutlinePaint(this.labelOutlinePaint);
View Full Code Here

Examples of org.jpedal.render.output.TextBlock

    //Reset current block and store the last one so we dont have to repeat javascript code later
    if(!currentTextBlock.isEmpty()) {
      previousTextBlock = currentTextBlock;
    }
    currentTextBlock = new TextBlock();

  }
View Full Code Here

Examples of org.jpedal.render.output.TextBlock

    //Reset current block and store the last one so we dont have to repeat javascript code later
    if(!currentTextBlock.isEmpty()) {
      previousTextBlock = currentTextBlock;
    }
    currentTextBlock = new TextBlock();

  }
View Full Code Here

Examples of org.openquark.cal.compiler.CALDocComment.TextBlock

                //
                final int nAuthors = caldoc.getNAuthorBlocks();
                if (nAuthors > 0) {
                    for (int i = 0; i < nAuthors; i++) {
                        buffer.append("\n").append("@author ");
                        final TextBlock authorBlock = caldoc.getNthAuthorBlock(i);
                        buffer.append(getJavadocFriendlyHTMLForCALDocTextBlock(authorBlock, crossRefGen));
                    }
                }

                /// The version
                //
                final TextBlock versionBlock = caldoc.getVersionBlock();
                if (versionBlock != null) {
                    buffer.append("\n").append("@version ");
                    buffer.append(getJavadocFriendlyHTMLForCALDocTextBlock(versionBlock, crossRefGen));
                }
            }

            /// The deprecated block comes after all other blocks, according to the Javadoc style guide.
            //
            final TextBlock deprecatedBlock = caldoc.getDeprecatedBlock();
            if (deprecatedBlock != null) {
                buffer.append("\n").append("@deprecated ");
                buffer.append(getJavadocFriendlyHTMLForCALDocTextBlock(deprecatedBlock, crossRefGen));
            }
        }
View Full Code Here

Examples of org.openquark.cal.compiler.CALDocComment.TextBlock

                    final String returnTypeHTML = getTypeAsFormattedString(typePieceStrings[argNames.length], disallowJavadocCodeBlock);
                    buffer.append(CALDocMessages.getString("calTypeIndicator", returnTypeHTML)).append(" ");
                }

                if (hasReturnBlock) {
                    final TextBlock returnBlock = caldoc.getReturnBlock();
                    final String returnDescription = getJavadocFriendlyHTMLForCALDocTextBlock(returnBlock, crossRefGen);

                    if (typePieces != null && returnDescription.trim().length() > 0) {
                        // if there is both a type description and an return description, separate them
                        // with a newline and some indentation
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.