本文整理汇总了Java中edu.mit.blocks.codeblockutil.CScrollPane.ScrollPolicy.VERTICAL_BAR_ALWAYS属性的典型用法代码示例。如果您正苦于以下问题:Java ScrollPolicy.VERTICAL_BAR_ALWAYS属性的具体用法?Java ScrollPolicy.VERTICAL_BAR_ALWAYS怎么用?Java ScrollPolicy.VERTICAL_BAR_ALWAYS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类edu.mit.blocks.codeblockutil.CScrollPane.ScrollPolicy
的用法示例。
在下文中一共展示了ScrollPolicy.VERTICAL_BAR_ALWAYS属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PopupExplorer
/**
* Constructor
*/
public PopupExplorer() {
super();
this.components = new ArrayList<Canvas>();
this.setLayout(null);
this.setOpaque(true);
this.setBackground(Color.GRAY);
this.viewport = new JPanel(new BorderLayout());
scroll = new CHoverScrollPane(
viewport,
ScrollPolicy.VERTICAL_BAR_ALWAYS,
ScrollPolicy.HORIZONTAL_BAR_NEVER,
20, Color.blue, new Color(0, 0, 50));
add(scroll, JLayeredPane.DEFAULT_LAYER);
setLayer(scroll, JLayeredPane.DEFAULT_LAYER, 0);
buttonPane = new ButtonPanel();
add(buttonPane, JLayeredPane.PALETTE_LAYER);
setLayer(buttonPane, JLayeredPane.PALETTE_LAYER, 0);
this.addComponentListener(this);
}
示例2: BlockCanvas
/**
* 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);
}
示例3: CHoverScrollPane
/**
* Constructs a custom CHoverScrollPane with the view port set to "view",
* with both scroll bar policies set to "ALWAYS" (see
* javax.swing.JScrollPane for a description on the use of
* scroll bar policies). Thumb will have girth of 10 and an interior
* color of black, hovering above a grayed-out transparant background.
*
* @param view
*
* @requires view != null
* @effects constructs a CScrollPane as described in method overview
*/
public CHoverScrollPane(JComponent view) {
this(view, ScrollPolicy.VERTICAL_BAR_ALWAYS,
ScrollPolicy.HORIZONTAL_BAR_ALWAYS);
}