當前位置: 首頁>>代碼示例>>Java>>正文


Java HorizontalFlowGroup類代碼示例

本文整理匯總了Java中com.kotcrab.vis.ui.layout.HorizontalFlowGroup的典型用法代碼示例。如果您正苦於以下問題:Java HorizontalFlowGroup類的具體用法?Java HorizontalFlowGroup怎麽用?Java HorizontalFlowGroup使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HorizontalFlowGroup類屬於com.kotcrab.vis.ui.layout包,在下文中一共展示了HorizontalFlowGroup類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getNewInstanceOfActor

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
@Override
protected Actor getNewInstanceOfActor(final LmlActorBuilder builder) {
    tabbedPane = new TabbedPane(builder.getStyleName());
    final Table mainTable = tabbedPane.getTable();
    // TabbedPane will be accessible through LmlUserObject#getData(). This disables oneColumn attribute, though.
    LmlUtilities.getLmlUserObject(mainTable).setData(tabbedPane);
    if (tabbedPane.getTabsPane().isHorizontal()
            || tabbedPane.getTabsPane().getActor() instanceof HorizontalFlowGroup) {
        mainTable.row();
    }
    // This will be the content table:
    mainTable.add(new VisTable()).grow().row();
    // There might be an expand+fill image in the second cell. We need to correct that:
    normalizeSecondCell(mainTable);
    return mainTable;
}
 
開發者ID:gdx-libs,項目名稱:gdx-lml-vis,代碼行數:17,代碼來源:TabbedPaneLmlTag.java

示例2: getHandledType

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
@Override
public Class<HorizontalFlowGroup> getHandledType() {
    return HorizontalFlowGroup.class;
}
 
開發者ID:czyzby,項目名稱:gdx-lml,代碼行數:5,代碼來源:HorizontalSpacingLmlAttribute.java

示例3: process

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
@Override
public void process(final LmlParser parser, final LmlTag tag, final HorizontalFlowGroup actor,
        final String rawAttributeData) {
    actor.setSpacing(parser.parseFloat(rawAttributeData, actor));
}
 
開發者ID:czyzby,項目名稱:gdx-lml,代碼行數:6,代碼來源:HorizontalSpacingLmlAttribute.java

示例4: getNewInstanceOfGroup

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
@Override
protected Group getNewInstanceOfGroup(final LmlActorBuilder builder) {
    return new HorizontalFlowGroup();
}
 
開發者ID:czyzby,項目名稱:gdx-lml,代碼行數:5,代碼來源:HorizontalFlowGroupLmlTag.java

示例5: getGroup

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
@Override
public WidgetGroup getGroup() {
    return new HorizontalFlowGroup();
}
 
開發者ID:czyzby,項目名稱:gdx-lml,代碼行數:5,代碼來源:DragPaneLmlActorBuilder.java

示例6: TabbedPane

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
public TabbedPane (TabbedPaneStyle style, Sizes sizes) {
	this.style = style;
	this.sizes = sizes;
	listeners = new Array<TabbedPaneListener>();

	sharedCloseActiveButtonStyle = VisUI.getSkin().get("close-active-tab", VisImageButtonStyle.class);

	group = new ButtonGroup<Button>();

	mainTable = new TabbedPaneTable(this);
	tabsPane = new DragPane(style.vertical ? new VerticalFlowGroup() : new HorizontalFlowGroup());
	configureDragPane(style);

	mainTable.setBackground(style.background);

	tabs = new Array<Tab>();
	tabsButtonMap = new IdentityMap<Tab, TabButtonTable>();

	Cell<DragPane> tabsPaneCell = mainTable.add(tabsPane);
	Cell<Image> separatorCell = null;

	if (style.vertical) {
		tabsPaneCell.top().growY().minSize(0, 0);
	} else {
		tabsPaneCell.left().growX().minSize(0, 0);
	}

	//note: if separatorBar height/width is not set explicitly it may sometimes disappear
	if (style.separatorBar != null) {
		if (style.vertical) {
			separatorCell = mainTable.add(new Image(style.separatorBar)).growY().width(style.separatorBar.getMinWidth());
		} else {
			mainTable.row();
			separatorCell = mainTable.add(new Image(style.separatorBar)).growX().height(style.separatorBar.getMinHeight());
		}
	} else {
		//make sure that tab will fill available space even when there is no separatorBar image set
		if (style.vertical) {
			mainTable.add().growY();
		} else {
			mainTable.add().growX();
		}
	}

	mainTable.setPaneCells(tabsPaneCell, separatorCell);
}
 
開發者ID:kotcrab,項目名稱:vis-editor,代碼行數:47,代碼來源:TabbedPane.java

示例7: TestFlowGroup

import com.kotcrab.vis.ui.layout.HorizontalFlowGroup; //導入依賴的package包/類
public TestFlowGroup () {
		super("flow groups");

		TableUtils.setSpacingDefaults(this);
		columnDefaults(0).left();

		setResizable(true);
		addCloseButton();
		closeOnEscape();

		WidgetGroup group = new VerticalFlowGroup(2);

		String lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus magna sit amet tellus egestas tincidunt. " +
				"Morbi tempus eleifend dictum. Nunc ex nisl, dignissim eget gravida vel, rutrum a nibh. Fusce congue odio ac elit " +
				"rhoncus rutrum. Donec nec lectus leo. Phasellus et consectetur ante. Cras vel consectetur mauris, sed semper lectus. ";
		String[] parts = lorem.split(" ");
		for (String part : parts) {
			group.addActor(new VisLabel(part));
		}

//		group.addActor(new VisLabel("Lorem ipsum"));
//		group.addActor(new VisLabel("dolor sit"));
//		group.addActor(new VisLabel("amet"));
//		group.addActor(new VisLabel("a\nb\nc"));
//		group.addActor(new VisLabel("Lorem ipsum"));
//		group.addActor(new VisLabel("dolor sit"));
//		group.addActor(new VisLabel("amet"));
//		group.addActor(new VisLabel("a\nb\nc"));
//		group.addActor(new VisLabel("Lorem ipsum"));
//		group.addActor(new VisLabel("dolor sit"));
//		group.addActor(new VisLabel("amet"));
//		group.addActor(new VisLabel("a\nb\nc"));

		VisScrollPane scrollPane = new VisScrollPane(group);
		scrollPane.setFadeScrollBars(false);
		scrollPane.setFlickScroll(false);
		scrollPane.setOverscroll(false, false);
		scrollPane.setScrollingDisabled(group instanceof HorizontalFlowGroup, group instanceof VerticalFlowGroup);
		add(scrollPane).grow();

		setSize(300, 150);
		centerWindow();
	}
 
開發者ID:kotcrab,項目名稱:vis-editor,代碼行數:44,代碼來源:TestFlowGroup.java


注:本文中的com.kotcrab.vis.ui.layout.HorizontalFlowGroup類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。