本文整理汇总了Java中edu.mit.blocks.codeblockutil.CGraphite类的典型用法代码示例。如果您正苦于以下问题:Java CGraphite类的具体用法?Java CGraphite怎么用?Java CGraphite使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CGraphite类属于edu.mit.blocks.codeblockutil包,在下文中一共展示了CGraphite类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BlockCanvas
import edu.mit.blocks.codeblockutil.CGraphite; //导入依赖的package包/类
/**
* Constructs BlockCanvas and subscribes
* this BlockCanvas to PageChange events
*/
public BlockCanvas(Workspace workspace) {
this.workspace = workspace;
this.canvas = new Canvas();
this.scrollPane = new CHoverScrollPane(canvas,
ScrollPolicy.VERTICAL_BAR_ALWAYS,
ScrollPolicy.HORIZONTAL_BAR_ALWAYS,
18, CGraphite.blue, null);
scrollPane.setScrollingUnit(5);
canvas.setLayout(null);
canvas.setBackground(Color.gray);
canvas.setOpaque(true);
PageChangeEventManager.addPageChangeListener(this);
}
示例2: setColor
import edu.mit.blocks.codeblockutil.CGraphite; //导入依赖的package包/类
public void setColor(Color color) {
if (color == null) {
this.color = CGraphite.blue;
} else {
this.color = color;
}
}
示例3: FactoryCanvas
import edu.mit.blocks.codeblockutil.CGraphite; //导入依赖的package包/类
FactoryCanvas(String name) {
this(name, CGraphite.blue);
}