本文整理汇总了Java中java.awt.Scrollbar.VERTICAL属性的典型用法代码示例。如果您正苦于以下问题:Java Scrollbar.VERTICAL属性的具体用法?Java Scrollbar.VERTICAL怎么用?Java Scrollbar.VERTICAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.Scrollbar
的用法示例。
在下文中一共展示了Scrollbar.VERTICAL属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClickPoint
@Override
protected Point getClickPoint(ComponentOperator oper, int direction, int orientation) {
int x, y;
if (orientation == Scrollbar.HORIZONTAL) {
if (direction == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) {
x = oper.getWidth() - 1 - CLICK_OFFSET;
} else if (direction == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) {
x = CLICK_OFFSET;
} else {
return null;
}
y = oper.getHeight() / 2;
} else if (orientation == Scrollbar.VERTICAL) {
if (direction == ScrollAdjuster.INCREASE_SCROLL_DIRECTION) {
y = oper.getHeight() - 1 - CLICK_OFFSET;
} else if (direction == ScrollAdjuster.DECREASE_SCROLL_DIRECTION) {
y = CLICK_OFFSET;
} else {
return null;
}
x = oper.getWidth() / 2;
} else {
return null;
}
return new Point(x, y);
}
示例2: Calque
/** Creation de l'objet calque */
protected Calque(Aladin aladin) {
this.aladin = aladin;
select = new Select(aladin);
zoom = new Zoom(aladin);
scroll = new ScrollbarStack(aladin,Scrollbar.VERTICAL,FIRSTBLOC-1,1,0,FIRSTBLOC);
// Creation des composantes de l'objet (plan, select et zoom)
reallocPlan();
flagOverlay = true;
reticleMode=aladin.configuration.get(Configuration.RETICLE)!=null ? 2 : 1;
flagTip=aladin.configuration.get(Configuration.TOOLTIP)!=null;
flagAutoDist = aladin.configuration.getAutoDist();
flagSimbad = aladin.configuration.getSimbadFlag();
flagVizierSED = aladin.configuration.getVizierSEDFlag();
setOverlayList("label,scale,size,NE,target,reticle,target,pixel");
// Panel principal : contient le selecteur de plans et le zoom
setLayout( new BorderLayout(0,5) );
add(select,BorderLayout.CENTER);
add(zoom,BorderLayout.SOUTH);
}
示例3: Calque
/** Creation de l'objet calque */
protected Calque(Aladin aladin) {
this.aladin = aladin;
select = new Select(aladin);
zoom = new Zoom(aladin);
scroll = new ScrollbarStack(aladin,Scrollbar.VERTICAL,FIRSTBLOC-1,1,0,FIRSTBLOC);
// Creation des composantes de l'objet (plan, select et zoom)
reallocPlan();
flagOverlay = true;
reticleMode=aladin.configuration.get(Configuration.RETICLE)!=null ? 2 : 1;
flagTip=aladin.configuration.get(Configuration.TOOLTIP)!=null;
flagAutoDist = aladin.configuration.getAutoDist();
flagSimbad = aladin.configuration.getSimbadFlag();
flagVizierSED = aladin.configuration.getVizierSEDFlag();
setOverlayList("label,scale,size,NE,target,reticle,target,pixel,sofiaimagers");
// Panel principal : contient le selecteur de plans et le zoom
setLayout( new BorderLayout(0,5) );
add(select,BorderLayout.CENTER);
add(zoom,BorderLayout.SOUTH);
}
示例4: setAsText
@Override
public void setAsText(String s) {
Integer i;
getTags();
if (s.equals(tags[0])) i = new Integer(Scrollbar.HORIZONTAL);
else i = new Integer(Scrollbar.VERTICAL);
setValue(i);
}
示例5: HVScroll
/**
* Constructor with a TGPanel <tt>tgp</tt> and TGLensSet <tt>tgls</tt>.
*/
public HVScroll(TGPanel tgp, TGLensSet tgls)
{
tgPanel = tgp;
tgLensSet = tgls;
offset = new TGPoint2D(0, 0);
scrolling = false;
adjustmentIsInternal = false;
horizontalSB = new DScrollbar(Scrollbar.HORIZONTAL, 0, 100, -1000, 1100);
horizontalSB.setBlockIncrement(100);
horizontalSB.setUnitIncrement(20);
horizontalSB.addAdjustmentListener(new horizAdjustmentListener());
verticalSB = new DScrollbar(Scrollbar.VERTICAL, 0, 100, -1000, 1100);
verticalSB.setBlockIncrement(100);
verticalSB.setUnitIncrement(20);
verticalSB.addAdjustmentListener(new vertAdjustmentListener());
hvLens = new HVLens();
hvDragUI = new HVDragUI(); // Hopefully this approach won't eat too much memory
hvScrollToCenterUI = new HVScrollToCenterUI();
tgPanel.addGraphListener(this);
}
示例6: getAsText
@Override
public String getAsText() {
int i = ((Integer) getValue()).intValue();
getTags();
return i == Scrollbar.VERTICAL ? tags[1] : tags[0];
}
示例7: getJavaInitializationString
@Override
public String getJavaInitializationString() {
int i = ((Integer) getValue()).intValue();
return i == Scrollbar.VERTICAL ? "java.awt.Scrollbar.VERTICAL" : "java.awt.Scrollbar.HORIZONTAL"; // NOI18N
}
示例8: PDFViewerBuffer
/**
* It render the section of the manual specified by @marker.
*
* @param title
* @param marker
* @throws IOException
*/
public PDFViewerBuffer(String title, ManualBookmarkers marker)
throws IOException {
super(title);
/** To avoid out of
* memory issue, it uses a buffer to load the pages.
*/
buffer = new Image[BUFFER_SIZE];
bufferIndex = new int[BUFFER_SIZE];
JPanel omni = new JPanel(new BorderLayout());
canvas = new JPanel();
loadManual(marker);
loadPage(0);
updateCanvas();
/**
* creation and management scrollbars
*/
bar = new Scrollbar(Scrollbar.VERTICAL, 0, 1, 0, (pageEnd - pageStart)
* SCROLLBAR_ACCURACY);
bar.addAdjustmentListener(this);
JScrollPane scroller = new JScrollPane(canvas);
scroller.getVerticalScrollBar().setPreferredSize(new Dimension(0, 0));
scroller.getHorizontalScrollBar().setPreferredSize(new Dimension(0, 0));
omni.add(scroller, BorderLayout.CENTER);
omni.add(bar, BorderLayout.WEST);
omni.add(bar, BorderLayout.EAST);
setContentPane(omni);
this.addWindowListener(new CloseHelpFileAdapter());
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Toolkit tk = Toolkit.getDefaultToolkit();
setPreferredSize(new Dimension((int) Math.min(imageWidth, tk.getScreenSize().getWidth()),
(int) Math.min(imageHeight * 1.9, tk.getScreenSize().getHeight())));
pack();
setVisible(true);
}
示例9: Tree
/**
* Constructor declaration
*
*/
Tree() {
super();
vData = new Vector();
setLayout(null);
sbHoriz = new Scrollbar(Scrollbar.HORIZONTAL);
add(sbHoriz);
sbVert = new Scrollbar(Scrollbar.VERTICAL);
add(sbVert);
}
示例10: Grid
/**
* Constructor declaration
*
*/
public Grid() {
super();
fFont = new Font("Dialog", Font.PLAIN, 12);
setLayout(null);
sbHoriz = new Scrollbar(Scrollbar.HORIZONTAL);
add(sbHoriz);
sbVert = new Scrollbar(Scrollbar.VERTICAL);
add(sbVert);
}
示例11: sliderVertical
public static Scrollbar sliderVertical(int value, int minScrollWidth, int maxScrollWidth, AdjustmentListener listener) {
Scrollbar slider = new Scrollbar(Scrollbar.VERTICAL, value, 1, minScrollWidth, maxScrollWidth);
slider.addAdjustmentListener(listener);
return slider;
}