List of usage examples for com.badlogic.gdx.utils IdentityMap IdentityMap
public IdentityMap()
From source file:com.kotcrab.vis.ui.widget.tabbedpane.TabbedPane.java
License:Apache License
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);//from ww w . j a v a 2 s . co m 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); }
From source file:es.eucm.ead.mockup.core.control.MockupController.java
License:Open Source License
public MockupController() { AbstractScreen.mockupController = this; AbstractScreen.am = new AssetManager(); Gdx.input.setCatchBackKey(true);/*from w w w. jav a 2 s . c o m*/ loading = new Loading(); loading.create(); // { loading.create(); } // Must be done before we create the other screens so if we // use variables like stagew, stageh... in their constructor (or final) // we make sure those attributes are properly setted. this.states = new IdentityMap<Screens, AbstractScreen>(); /* MENUS */ this.states.put(Screens.MAIN_MENU, new MainMenu()); this.states.put(Screens.PROJECT_MENU, new ProjectMenu()); /* GALLERIES */ this.states.put(Screens.GALLERY, new Gallery()); this.states.put(Screens.PROJECT_GALLERY, new ProjectGallery()); this.states.put(Screens.SCENE_GALLERY, new SceneGallery()); this.states.put(Screens.ELEMENT_GALLERY, new ElementGallery()); /* CAMARA */ this.states.put(Screens.RECORDING, new Recording()); this.states.put(Screens.PICTURE, new Picture()); /* EDITION */ this.states.put(Screens.SCENE_EDITION, new SceneEdition()); this.states.put(Screens.ELEMENT_EDITION, new ElementEdition()); this.screenCtr = new ScreenController(); actualScreen = Screens.LOADING; this.screenCtr.setCurrentScreen(loading); }