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


Java JmeFormatter类代码示例

本文整理汇总了Java中com.jme3.util.JmeFormatter的典型用法代码示例。如果您正苦于以下问题:Java JmeFormatter类的具体用法?Java JmeFormatter怎么用?Java JmeFormatter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: main

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
public static void main(String[] args){
    JmeFormatter formatter = new JmeFormatter();

    Handler consoleHandler = new ConsoleHandler();
    consoleHandler.setFormatter(formatter);

    Logger.getLogger("").removeHandler(Logger.getLogger("").getHandlers()[0]);
    Logger.getLogger("").addHandler(consoleHandler);
    
    SwingUtilities.invokeLater(new Runnable(){
        public void run(){
            JPopupMenu.setDefaultLightWeightPopupEnabled(false);

            createFrame();
            createCanvas(appClass);
            
            frame.getContentPane().add(canvas);
            frame.pack();
            startApp();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        }
    });
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:25,代码来源:TestCanvas.java

示例2: initialize

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
public void initialize(AppSettings settings) {
        if (initialized) {
            return;
        }

        initialized = true;
        try {
            JmeFormatter formatter = new JmeFormatter();

//            Handler consoleHandler = new AndroidLogHandler();
//            consoleHandler.setFormatter(formatter);
        } catch (SecurityException ex) {
            logger.log(Level.SEVERE, "Security error in creating log file", ex);
        }
        logger.log(Level.INFO, "Running on {0}", getFullName());
    }
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:17,代码来源:JmeSystemDelegateImpl.java

示例3: initialize

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
public static void initialize(AppSettings settings) {
    if (initialized) {
        return;
    }

    initialized = true;
    try {
        JmeFormatter formatter = new JmeFormatter();

        Handler consoleHandler = new AndroidLogHandler();
        consoleHandler.setFormatter(formatter);
    } catch (SecurityException ex) {
        logger.log(Level.SEVERE, "Security error in creating log file", ex);
    }
    logger.log(Level.INFO, "Running on {0}", getFullName());
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:17,代码来源:JmeSystem.java

示例4: start

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
public void start() {
	JmeFormatter formatter = new JmeFormatter();

	Handler consoleHandler = new ConsoleHandler();
	consoleHandler.setFormatter(formatter);

	Logger.getLogger("").removeHandler(
			Logger.getLogger("").getHandlers()[0]);
	Logger.getLogger("").addHandler(consoleHandler);

	try {
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
	} catch (Exception e) {
		e.printStackTrace();
	}

	createCanvas();

	try {
		Thread.sleep(500);
	} catch (InterruptedException ex) {

	}

	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
			JPopupMenu.setDefaultLightWeightPopupEnabled(false);

			createFrame();

			canvasPanel.add(canvas, BorderLayout.CENTER);
			frame.pack();
			startApp();
			frame.setLocationRelativeTo(null);
			frame.setVisible(true);
		}
	});
}
 
开发者ID:morris,项目名称:vstools-java,代码行数:39,代码来源:GUI.java

示例5: main

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
public static void main(String[] args){
    JmeFormatter formatter = new JmeFormatter();

    Handler consoleHandler = new ConsoleHandler();
    consoleHandler.setFormatter(formatter);

    Logger.getLogger("").removeHandler(Logger.getLogger("").getHandlers()[0]);
    Logger.getLogger("").addHandler(consoleHandler);
    
    createCanvas(appClass);
    
    try {
        Thread.sleep(500);
    } catch (InterruptedException ex) {
    }
    
    SwingUtilities.invokeLater(new Runnable(){
        public void run(){
            JPopupMenu.setDefaultLightWeightPopupEnabled(false);

            createFrame();
            
            currentPanel.add(canvas, BorderLayout.CENTER);
            frame.pack();
            startApp();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        }
    });
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:31,代码来源:TestCanvas.java

示例6: main

import com.jme3.util.JmeFormatter; //导入依赖的package包/类
@SuppressWarnings("unchecked")
  public static void main(String[] args) {
//load save
File root = new File("./saves/");
JFileChooser chooser = new JFileChooser(root);
chooser.addChoosableFileFilter(new FileNameExtensionFilter(null, "save"));
chooser.setFileFilter(new FileNameExtensionFilter(null, "save"));
int result = chooser.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
	try (ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(chooser.getSelectedFile())))) {
		loadedStep = (Class<? extends AbstractTerrainStep>) in.readObject();
		loadedProperties = (Map<Object, Object>) in.readObject();
	} catch (Exception ex) {
		LOG.log(Level.SEVERE, "unable to load save file", ex);
	}
}

Logger rootLogger = Logger.getLogger("");
for (Handler h : rootLogger.getHandlers()) {
	if (h instanceof ConsoleHandler) {
		((ConsoleHandler) h).setFormatter(new JmeFormatter());
	}
}

//create app
      TerrainHeighmapCreator app = new TerrainHeighmapCreator();
app.getStateManager().detach(app.getStateManager().getState(FlyCamAppState.class));
AppSettings settings = new AppSettings(true);
settings.setUseJoysticks(true);
settings.setResolution(1280, 800);
settings.setVSync(true);
if (RECORDING_TIMER) {
	settings.setFrameRate(30);
}
app.setSettings(settings);
app.setShowSettings(true);
if (RECORDING_TIMER) {
	app.setTimer(new VideoRecorderAppState.IsoTimer(30));
}
      app.start();
  }
 
开发者ID:shamanDevel,项目名称:ProceduralTerrain,代码行数:42,代码来源:TerrainHeighmapCreator.java


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