当前位置: 首页>>代码示例>>Java>>正文


Java RectangleConstraint.getWidthConstraintType方法代码示例

本文整理汇总了Java中org.jfree.chart.block.RectangleConstraint.getWidthConstraintType方法的典型用法代码示例。如果您正苦于以下问题:Java RectangleConstraint.getWidthConstraintType方法的具体用法?Java RectangleConstraint.getWidthConstraintType怎么用?Java RectangleConstraint.getWidthConstraintType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.block.RectangleConstraint的用法示例。


在下文中一共展示了RectangleConstraint.getWidthConstraintType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and 
 * returns the block size.
 * 
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 * 
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint cc = toContentConstraint(constraint);
    LengthConstraintType w = cc.getWidthConstraintType();
    LengthConstraintType h = cc.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }            
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.RANGE) {
            contentSize = arrangeRR(g2, cc.getWidthRange(), 
                    cc.getHeightRange()); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }
    }
    return new Size2D(calculateTotalWidth(contentSize.getWidth()),
            calculateTotalHeight(contentSize.getHeight()));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:52,代码来源:TextTitle.java

示例2: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and
 * returns the block size.
 *
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 *
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint contentConstraint = toContentConstraint(constraint);
    LengthConstraintType w = contentConstraint.getWidthConstraintType();
    LengthConstraintType h = contentConstraint.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeNN(g2);
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            contentSize = new Size2D(
                contentConstraint.getWidth(),
                contentConstraint.getHeight()
            );
        }
    }
    return new Size2D(
        calculateTotalWidth(contentSize.getWidth()),
        calculateTotalHeight(contentSize.getHeight())
    );
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:56,代码来源:LegendGraphic.java

示例3: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and
 * returns the block size.
 *
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 *
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint cc = toContentConstraint(constraint);
    LengthConstraintType w = cc.getWidthConstraintType();
    LengthConstraintType h = cc.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeNN(g2);
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeRN(g2, cc.getWidthRange());
        }
        else if (h == LengthConstraintType.RANGE) {
            contentSize = arrangeRR(g2, cc.getWidthRange(),
                    cc.getHeightRange());
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeFN(g2, cc.getWidth());
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    return new Size2D(calculateTotalWidth(contentSize.getWidth()),
            calculateTotalHeight(contentSize.getHeight()));
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:52,代码来源:TextTitle.java

示例4: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Performs a layout for this title, subject to the supplied constraint,
 * and returns the dimensions required for the title (if the title
 * cannot be displayed in the available space, this method will return
 * zero width and height for the dimensions).
 *
 * @param g2  the graphics target.
 * @param constraint  the layout constraints.
 *
 * @return The dimensions for the title.
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint cc = toContentConstraint(constraint);
    LengthConstraintType w = cc.getWidthConstraintType();
    LengthConstraintType h = cc.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeNN(g2);
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeRN(g2, cc.getWidthRange());
        }
        else if (h == LengthConstraintType.RANGE) {
            contentSize = arrangeRR(g2, cc.getWidthRange(),
                    cc.getHeightRange());
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeFN(g2, cc.getWidth());
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    if (contentSize.width <= 0.0 || contentSize.height <= 0.0) {
        return new Size2D(0.0, 0.0);
    }
    else {
        return new Size2D(calculateTotalWidth(contentSize.getWidth()),
                calculateTotalHeight(contentSize.getHeight()));
    }
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:59,代码来源:ShortTextTitle.java

示例5: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and
 * returns the block size.
 *
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 *
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint cc = toContentConstraint(constraint);
    LengthConstraintType w = cc.getWidthConstraintType();
    LengthConstraintType h = cc.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = new Size2D(getWidth(), getHeight());
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            contentSize = arrangeRR(g2, cc.getWidthRange(),
                    cc.getHeightRange());
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    return new Size2D(calculateTotalWidth(contentSize.getWidth()),
            calculateTotalHeight(contentSize.getHeight()));
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:52,代码来源:PaintScaleLegend.java

示例6: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and 
 * returns the block size.
 * 
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 * 
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint contentConstraint = toContentConstraint(constraint);
    LengthConstraintType w = contentConstraint.getWidthConstraintType();
    LengthConstraintType h = contentConstraint.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = arrangeNN(g2);
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented.");
        }
        else if (h == LengthConstraintType.FIXED) {   
            contentSize = new Size2D(
                contentConstraint.getWidth(),
                contentConstraint.getHeight()
            );
        }            
    }
    return new Size2D(
        calculateTotalWidth(contentSize.getWidth()), 
        calculateTotalHeight(contentSize.getHeight())
    );
}
 
开发者ID:nologic,项目名称:nabs,代码行数:56,代码来源:LegendGraphic.java

示例7: arrange

import org.jfree.chart.block.RectangleConstraint; //导入方法依赖的package包/类
/**
 * Arranges the contents of the block, within the given constraints, and 
 * returns the block size.
 * 
 * @param g2  the graphics device.
 * @param constraint  the constraint (<code>null</code> not permitted).
 * 
 * @return The block size (in Java2D units, never <code>null</code>).
 */
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
    RectangleConstraint cc = toContentConstraint(constraint);
    LengthConstraintType w = cc.getWidthConstraintType();
    LengthConstraintType h = cc.getHeightConstraintType();
    Size2D contentSize = null;
    if (w == LengthConstraintType.NONE) {
        if (h == LengthConstraintType.NONE) {
            contentSize = new Size2D(getWidth(), getHeight()); 
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }            
    }
    else if (w == LengthConstraintType.RANGE) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.RANGE) {
            contentSize = arrangeRR(g2, cc.getWidthRange(), 
                    cc.getHeightRange()); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }
    }
    else if (w == LengthConstraintType.FIXED) {
        if (h == LengthConstraintType.NONE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.RANGE) {
            throw new RuntimeException("Not yet implemented."); 
        }
        else if (h == LengthConstraintType.FIXED) {
            throw new RuntimeException("Not yet implemented.");                 
        }
    }
    return new Size2D(calculateTotalWidth(contentSize.getWidth()),
            calculateTotalHeight(contentSize.getHeight()));
}
 
开发者ID:nologic,项目名称:nabs,代码行数:52,代码来源:PaintScaleLegend.java


注:本文中的org.jfree.chart.block.RectangleConstraint.getWidthConstraintType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。