com.badlogic.gdx.scenes.scene2d.ui.Table.clear()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(258)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Table.clear()方法的一些代码示例,展示了Table.clear()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.clear()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Table
类名称:Table
方法名:clear

Table.clear介绍

[英]Removes all actors and cells from the table.
[中]从表中删除所有参与者和单元格。

代码示例

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

  1. protected void clearProps() {
  2. table.clear();
  3. }
  4. }

代码示例来源:origin: narfman0/GDXWorld

  1. @Override public void clicked(InputEvent event, float x, float y) {
  2. groups.clear();
  3. groupTable.clear();
  4. }
  5. });

代码示例来源:origin: narfman0/GDXWorld

  1. @Override public void clicked(InputEvent event, float x, float y) {
  2. vertices.clear();
  3. vertexTables.clear();
  4. }
  5. });

代码示例来源:origin: narfman0/GDXWorld

  1. @Override public void clicked(InputEvent event, float x, float y) {
  2. vertexTables.clear();
  3. nodes.clear();
  4. }
  5. });

代码示例来源:origin: narfman0/GDXWorld

  1. public void clean() {
  2. tiles.clear();
  3. tileTable.clear();
  4. }
  5. }

代码示例来源:origin: narfman0/GDXWorld

  1. @Override public void clicked(InputEvent event, float x, float y) {
  2. animations.clear();
  3. table.clear();
  4. }
  5. });

代码示例来源:origin: narfman0/GDXWorld

  1. @Override public void clicked(InputEvent event, float x, float y) {
  2. metadata.getCameraShots().clear();
  3. cameraShotsTable.clear();
  4. }
  5. });

代码示例来源:origin: narfman0/GDXWorld

  1. public void repopulate() {
  2. vertexTables.clear();
  3. populateVertexTable();
  4. }
  5. }

代码示例来源:origin: narfman0/GDXWorld

  1. public void remove(Vector2 vertex) {
  2. nodes.remove(vertex);
  3. vertexTables.clear();
  4. populateVertexTable();
  5. Log.log("PathWindow.remove", " vector: " + vertex);
  6. }

代码示例来源:origin: kotcrab/vis-ui

  1. private void rebuild () {
  2. menuItems.clear();
  3. for (Menu menu : menus)
  4. menuItems.add(menu.getOpenButton());
  5. }

代码示例来源:origin: narfman0/GDXWorld

  1. private void update(Skin skin, Table optionTable){
  2. table.clear();
  3. table.add(optionTable);
  4. pack();
  5. setPosition(0f, 0f);
  6. }
  7. }

代码示例来源:origin: narfman0/GDXWorld

  1. private ManifestationTable createManifestationTable(Skin skin, Object manifestation){
  2. if(manifestationTable != null)
  3. manifestationTable.remove();
  4. for(IQuestComponentManifestation plugin : PluginUtil.getPlugins(IQuestComponentManifestation.class))
  5. if(manifestation.getClass() == plugin.getDefault().getClass())
  6. manifestationTable = (ManifestationTable) plugin.createTable(skin, manifestation);
  7. parentManifestationTable.clear();
  8. parentManifestationTable.add(manifestationTable);
  9. return manifestationTable;
  10. }

代码示例来源:origin: langurmonkey/gaiasky

  1. /**
  2. * Drops the current view and regenerates all window content
  3. */
  4. private void reloadAll() {
  5. backupScrollValues();
  6. content.clear();
  7. build();
  8. pack();
  9. restoreScrollValues();
  10. }

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

  1. protected void init(PARENT parent, T e, InputPanel[] inputs) {
  2. this.e = e;
  3. this.parent = parent;
  4. this.i = inputs;
  5. getCenterPanel().clear();
  6. for (InputPanel i : inputs) {
  7. addInputPanel(i);
  8. }
  9. if (e == null) {
  10. setTitle("CREATE OBJECT");
  11. } else {
  12. setTitle("EDITING " + e.getClass().getSimpleName());
  13. try{
  14. modelToInputs();
  15. } catch (Exception e1) {
  16. EditorLogger.error(e1.getMessage(), e1);
  17. }
  18. }
  19. // TODO Set focus to the 1st element
  20. // if(inputs.length > 0) {
  21. // getStage().setKeyboardFocus(inputs[0].getField());
  22. // }
  23. }

代码示例来源:origin: langurmonkey/gaiasky

  1. public void initialize(IStarFocus st) {
  2. this.st = st;
  3. table.clear();
  4. requestData(new GaiaDataListener(st));
  5. table.pack();
  6. //scroll.setWidth(Math.max(table.getWidth() + scroll.getStyle().vScroll.getMinWidth(), 500 * GlobalConf.SCALE_FACTOR));
  7. pack();
  8. me.setPosition(Math.round(stage.getWidth() / 2f - me.getWidth() / 2f), Math.round(stage.getHeight() / 2f - me.getHeight() / 2f));
  9. }

代码示例来源:origin: langurmonkey/gaiasky

  1. @Override
  2. protected void build() {
  3. content.clear();
  4. content.add(new OwnLabel(txt("gui.quit.sure"), skin)).left().pad(pad).row();
  5. }

代码示例来源:origin: narfman0/GDXWorld

  1. public void updateAnimationTable(final Skin skin){
  2. if(animationEditor != null)
  3. animationEditor.applyCurrentAnimationTable();
  4. animationTable.clear();
  5. if(animationSelectBox.getSelected() != null)
  6. animationTable.add(animationEditor = new AnimationEditor(skin,
  7. stage, animationSelectBox.getSelected().animation, this));
  8. pack();
  9. setX(Gdx.graphics.getWidth());
  10. }

代码示例来源:origin: langurmonkey/gaiasky

  1. private Thread getCheckVersionThread() {
  2. // Start version check
  3. VersionChecker vc = new VersionChecker(GlobalConf.program.VERSION_CHECK_URL);
  4. vc.setListener(event -> {
  5. if (event instanceof VersionCheckEvent) {
  6. VersionCheckEvent vce = (VersionCheckEvent) event;
  7. if (!vce.isFailed()) {
  8. checkTable.clear();
  9. checkTable.add(checkLabel).top().left().padBottom(pad).row();
  10. // All is fine
  11. newVersionCheck(vce.getTag(), vce.getTagTime());
  12. } else {
  13. // Handle failed case
  14. checkLabel.setText(txt("notif.error", "Could not get last version"));
  15. checkLabel.setColor(Color.RED);
  16. }
  17. }
  18. return false;
  19. });
  20. return new Thread(vc);
  21. }

代码示例来源:origin: narfman0/GDXWorld

  1. private void handleGDXAnimationHandlerSelected(final Skin skin, final GDXAnimationHandler handler, final AbstractWindow window){
  2. activeCheckbox.setChecked(handler.isActive());
  3. final SelectBox<SelectboxGDXAnimationStruct> animationSelectbox = new SelectBox<>(skin);
  4. animationSelectbox.setItems(SelectboxGDXAnimationStruct.create(handler.getAnimations().getAnimations()));
  5. animationSelectbox.addListener(new ChangeListener() {
  6. @Override public void changed(ChangeEvent event, Actor actor) {
  7. handler.applyCurrentAnimation(animationSelectbox.getSelected().animation, 0);
  8. window.pack();
  9. }
  10. });
  11. animationsTable.clear();
  12. animationsTable.add("Current animation: ");
  13. animationsTable.add(animationSelectbox);
  14. if(!handler.getAnimations().getAnimations().isEmpty()){
  15. handler.applyCurrentAnimation(animationSelectbox.getSelected().animation, 0);
  16. window.pack();
  17. }
  18. window.pack();
  19. }

代码示例来源:origin: langurmonkey/gaiasky

  1. @Override
  2. protected void build() {
  3. float padb = 5 * GlobalConf.SCALE_FACTOR;
  4. content.clear();
  5. content.pad(10 * GlobalConf.SCALE_FACTOR);
  6. content.add(new OwnLabel(txt("gui.newversion.new.current") + ":", skin)).left().padRight(padb).padBottom(padb);
  7. content.add(new OwnLabel(GlobalConf.version.version, skin)).left().padBottom(padb).row();
  8. content.add(new OwnLabel(txt("gui.newversion.new.new") + ":", skin)).left().padRight(padb).padBottom(padb * 2);
  9. content.add(new OwnLabel(tagVersion, skin, "header")).left().padBottom(padb * 2).row();
  10. Label.LabelStyle linkStyle = skin.get("link", Label.LabelStyle.class);
  11. content.add(new Link(txt("gui.newversion.getit"), linkStyle, GlobalConf.WEBPAGE_DOWNLOADS)).center().colspan(2);
  12. }

相关文章