本文整理了Java中javax.swing.JScrollPane.setHorizontalScrollBar()
方法的一些代码示例,展示了JScrollPane.setHorizontalScrollBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.setHorizontalScrollBar()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:setHorizontalScrollBar
暂无
代码示例来源:origin: ron190/jsql-injection
private ControlPanel(JScrollPane scrollPane) {
this.setLayout(new BorderLayout());
this.setOpaque(false);
this.vScrollBar = new JMyScrollBar(Adjustable.VERTICAL);
scrollPane.setVerticalScrollBar(this.vScrollBar);
scrollPane.remove(this.vScrollBar);
if (scrollPane.getVerticalScrollBarPolicy() != ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER) {
this.add(this.vScrollBar, BorderLayout.EAST);
}
this.hScrollBar = new JMyScrollBar(Adjustable.HORIZONTAL);
scrollPane.setHorizontalScrollBar(this.hScrollBar);
scrollPane.remove(this.hScrollBar);
if (scrollPane.getHorizontalScrollBarPolicy() != ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER) {
this.add(this.hScrollBar, BorderLayout.SOUTH);
}
}
}
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_http
private JPanel createTargetPanel() {
targetNodesModel = new DefaultComboBoxModel<>();
targetNodes = new JComboBox<>(targetNodesModel);
targetNodes.setPrototypeDisplayValue(""); // $NON-NLS-1$ // Bug 56303 fixed the width of combo list
JPopupMenu popup = (JPopupMenu) targetNodes.getUI().getAccessibleChild(targetNodes, 0); // get popup element
JScrollPane scrollPane = findScrollPane(popup);
if(scrollPane != null) {
scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL)); // add scroll pane if label element is too long
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
targetNodes.setActionCommand(CHANGE_TARGET);
// Action listener will be added later
JLabel label = new JLabel(JMeterUtils.getResString("proxy_target")); // $NON-NLS-1$
label.setLabelFor(targetNodes);
HorizontalPanel panel = new HorizontalPanel();
panel.add(label);
panel.add(targetNodes);
return panel;
}
代码示例来源:origin: com.synaptix/SynaptixSwing
rightScrollPane = new JScrollPane(rightComponent);
rightScrollPane.setBorder(null);
rightScrollPane.setHorizontalScrollBar(new MyScrollBar(JScrollBar.HORIZONTAL));
rightScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
rightScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
leftScrollPane.setHorizontalScrollBar(new MyScrollBar(JScrollBar.HORIZONTAL));
leftScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
leftScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
代码示例来源:origin: com.synaptix/SynaptixTattoo
/**
* Creates the scroll pane which houses the scrollable list.
*/
protected JScrollPane createScroller() {
JScrollPane sp = new JScrollPane(list,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
sp.setHorizontalScrollBar(null);
return sp;
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki
/**
* Creates the scroll pane which houses the scrollable tree.
*/
protected JScrollPane createScroller() {
JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
sp.setHorizontalScrollBar(null);
sp.setName("TreePopup.scrollPane");
sp.setFocusable(false);
sp.getVerticalScrollBar().setFocusable(false);
sp.setBorder(null);
return sp;
}
代码示例来源:origin: elki-project/elki
/**
* Creates the scroll pane which houses the scrollable tree.
*/
protected JScrollPane createScroller() {
JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
sp.setHorizontalScrollBar(null);
sp.setName("TreePopup.scrollPane");
sp.setFocusable(false);
sp.getVerticalScrollBar().setFocusable(false);
sp.setBorder(null);
return sp;
}
代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-gui-minigui
/**
* Creates the scroll pane which houses the scrollable tree.
*/
protected JScrollPane createScroller() {
JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
sp.setHorizontalScrollBar(null);
sp.setName("TreePopup.scrollPane");
sp.setFocusable(false);
sp.getVerticalScrollBar().setFocusable(false);
sp.setBorder(null);
return sp;
}
代码示例来源:origin: stackoverflow.com
_component.setForeground((isSelected) ? Color.WHITE : Color.BLACK);
_pane.setHorizontalScrollBar(_pane.createHorizontalScrollBar());
_pane.setVerticalScrollBar(_pane.createVerticalScrollBar());
_pane.setBorder(new EmptyBorder(0,0,0,0));
代码示例来源:origin: stackoverflow.com
sPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
JScrollBar horizontalScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
sPane.setHorizontalScrollBar(horizontalScrollBar);
setBorder(BorderFactory.createLineBorder(Color.RED));
add(sPane.getViewport());
代码示例来源:origin: org.xworker/xworker_core
public static void createHorizontalScrollBar(ActionContext actionContext){
JScrollPane parent = (JScrollPane) actionContext.get("parent");
Thing thing = World.getInstance().getThing("xworker.javax.swing.JScrollBar");
JScrollBar obj = (JScrollBar) thing.run("create", actionContext);
if(obj != null){
parent.setHorizontalScrollBar(obj);
}
}
代码示例来源:origin: jcoplien/trygve
jScrollPane1.setHorizontalScrollBar(null);
if (OLD) {
jScrollPane2.setHorizontalScrollBar(null);
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
jsp.setHorizontalScrollBar(null);
内容来源于网络,如有侵权,请联系作者删除!