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


Java Nifty.scheduleEndOfFrameElementAction方法代码示例

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


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

示例1: createNewGui

import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
/**
 * Create a new gui from a file and current assetFolder as assets
 * @param nifty a valid Nifty instace @see Nifty
 * @throws ParserConfigurationException if controller failed to create
 * a valid document instance
 * @throws IOException
 * @throws  SAXException
 * @throws Exception if nifty can't create the gui
 * @return A string with the elements that weren't loaded
 * 
 */
public String createNewGui(Nifty nifty ,File filename) throws ParserConfigurationException, IOException, SAXException, NoProductException, Exception{
   String assets= ".";
   if(this.gui != null){
      assets = this.gui.getAssetFolder().getPath(); 
   }
   GUIReader reader = new GUIReader(nifty);
   String res = "";
   this.gui = reader.readGUI(filename);
   this.gui.setAssetFolder(new File(assets));
   res = reader.getTagNotLoaded();
   final GScreen screen =this.getGui().gettopScreen();
   for(String sel : nifty.getAllScreensName()){
                nifty.removeScreen(sel);
   }
   writer = new GUIWriter(gui);
  nifty.scheduleEndOfFrameElementAction(new Reload(nifty, screen.getID()), new EndNotify() {

        @Override
        public void perform() {
           setChanged();
           notifyObservers(new ReloadGuiEvent(gui));
           clearChanged();
        }
    });
   currentL=gui.getTopLayer();
   currentS=gui.gettopScreen();
   currentlayers.addAll(gui.getLayers());
   dragDropManager = new NiftyDDManager(nifty);
   this.model.setCurentGUI(gui);
   return res;
        
}
 
开发者ID:relu91,项目名称:niftyeditor,代码行数:44,代码来源:GUIEditor.java

示例2: refresh

import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
/**
 * Refresh the current gui . It causes a call to nifty.fromXml method. 
 * @param nifty
 * @throws Exception if nifty can't load the old gui
 */
public void refresh(Nifty nifty) throws Exception{
    if(getGui() != null){
        String screenID =this.currentS.getID();
            nifty.scheduleEndOfFrameElementAction(new Reload(nifty, screenID), null);
            
            
    }
}
 
开发者ID:relu91,项目名称:niftyeditor,代码行数:14,代码来源:GUIEditor.java


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