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


Java ScrollPane.layout方法代码示例

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.layout方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollPane.layout方法的具体用法?Java ScrollPane.layout怎么用?Java ScrollPane.layout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.scenes.scene2d.ui.ScrollPane的用法示例。


在下文中一共展示了ScrollPane.layout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Addtogroup

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void Addtogroup(){
    grchatfaction = new VerticalGroup();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
    try {
        grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Welcome Chat!"));
        grchatfaction.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.BLUE,"Faction!"));
        grchatfaction.addActor(labelTest1);
    } catch (ParseException e) {
        e.printStackTrace();
        Gdx.app.log("eroare","intra");
    }
    sp = new ScrollPane(grchatfaction);
    sp.layout();
    sp.setScrollingDisabled(true, false);
    sp.setFillParent(true);sp.setLayoutEnabled(true);
    ta = new Table();
    ta.setFillParent(false);
    ta.add(sp).fill().expand();
    ta.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
    ta.setVisible(false);
    groupbotttom.addActor(ta);
    sp.setScrollPercentY(200);
    sp.act(Gdx.graphics.getDeltaTime());
    sp.updateVisualScroll();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java

示例2: addchatlocation

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void addchatlocation(){
    grchatlocation = new VerticalGroup();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/HH:mm:ss");
    try {
        grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.RED,"Welcome Chat!"));
        grchatlocation.addActor(addComment(sdf.parse("2016/5/17/13:34:23"),"adrian", Color.GREEN,"Location!"));
        grchatlocation.addActor(labelTest);
    } catch (ParseException e) {
        e.printStackTrace();
        Gdx.app.log("eroare","intra");
    }
    scrollchatpublic = new ScrollPane(grchatlocation);
    scrollchatpublic.layout();
    scrollchatpublic.setScrollingDisabled(true, false);
    scrollchatpublic.setFillParent(true);
    scrollchatpublic.setLayoutEnabled(true);
    tablechatpublic = new Table();
    tablechatpublic.setFillParent(false);
    tablechatpublic.add(scrollchatpublic).fill().expand();
    tablechatpublic.setBounds(WIDTH *0.05f,background1.getY(), WIDTH*0.9f,background1.getHeight() * 1.05f);
    groupbotttom.addActor(tablechatpublic);
    scrollchatpublic.setScrollPercentY(100);
    scrollchatpublic.act(Gdx.graphics.getDeltaTime());
    scrollchatpublic.updateVisualScroll();
}
 
开发者ID:TudorRosca,项目名称:enklave,代码行数:26,代码来源:ScreenChat.java

示例3: create_pages_texture

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
private void create_pages_texture() {
	// TODO Auto-generated method stub
			
			 Table container = new Table();
			 Table table = new Table();
			container.setDebug(debug_pages);
			 table.setDebug(debug_pages);
			 container.setFillParent(true);
 
			  pages_scroll_pane = new ScrollPane(table);

			 pages_scroll_pane.layout();
			 container.add(pages_scroll_pane).width(screen_width).height(screen_height);
			 ;
			 pages_scroll_pane.setTouchable(Touchable.enabled);
			 pages_scroll_pane.setBounds(0, 0, screen_width, screen_height);
			  
			    container.setBounds(0,0,screen_width,screen_height);
			    container.setTouchable(Touchable.enabled);
			    
			    pages_stage.addActor(container);
			    
			    for (int i = 1 ;i <=pages_no ;i++){
					 Table tablea = new Table();
					// tablea.setColor((float)Math.random(),(float)Math.random(),(float)Math.random(),1);
					 tablea.setDebug(debug_pages);
					 table.add(tablea).width(screen_width).height(screen_height);
					 table.row();
					 pages_draw_stage.addActor(new PageSeen(i));
					}
			  
}
 
开发者ID:omar6597,项目名称:alquran-alkarem,代码行数:33,代码来源:book.java

示例4: refreshImage

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
/**
 * 
 */
private void refreshImage() {
	
	float newX = imgWidth * currentZoom;
	float newY = imgHeight * currentZoom;
	
	image.setSize(newX, newY);
	cellImage.width(newX).height(newY);
	tableEditor.setWidth(newX);
	tableEditor.setHeight(newY);
	ScrollPane sp = (ScrollPane) tableEditor.getParent();
	sp.layout();
	
}
 
开发者ID:cobolfoo,项目名称:gdx-skineditor,代码行数:17,代码来源:NinePatchEditorDialog.java


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