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


Java Scrollbar.VERTICAL属性代码示例

本文整理汇总了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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:ScrollbarDriver.java

示例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);
}
 
开发者ID:jankotek,项目名称:asterope,代码行数:24,代码来源:Calque.java

示例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);
}
 
开发者ID:svvatters,项目名称:SOFIAladin,代码行数:24,代码来源:Calque.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ScrollbarBeanInfo.java

示例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);
}
 
开发者ID:dvorka,项目名称:mindraider,代码行数:30,代码来源:HVScroll.java

示例6: getAsText

@Override
public String getAsText() {
    int i = ((Integer) getValue()).intValue();
    getTags();
    return i == Scrollbar.VERTICAL ? tags[1] : tags[0];
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:ScrollbarBeanInfo.java

示例7: getJavaInitializationString

@Override
public String getJavaInitializationString() {
    int i = ((Integer) getValue()).intValue();
    return i == Scrollbar.VERTICAL ? "java.awt.Scrollbar.VERTICAL" : "java.awt.Scrollbar.HORIZONTAL"; // NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ScrollbarBeanInfo.java

示例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);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:47,代码来源:PDFViewerBuffer.java

示例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);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:20,代码来源:Tree.java

示例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);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:20,代码来源:Grid.java

示例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;
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:5,代码来源:EzLayout.java


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