• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java SLAnimator类的典型用法和代码示例

java 1次浏览

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

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

示例1: main

点赞 3

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
public static void main(String[] args) {
	internet = Helper.isInternetReachable();
	SLAnimator.start();
	new Game();
	Properties p = new Properties();
	p.put("logoString", "");
	AcrylLookAndFeel.setTheme(p);
	
	try {
		ToolTipManager.sharedInstance().setInitialDelay(0);
		UIManager.setLookAndFeel(new AcrylLookAndFeel());
	} catch (Exception e) {
		e.printStackTrace();
	}
	
	new DakrorLauncher();
}
 

开发者ID:Dakror,
项目名称:DakrorLauncher,
代码行数:18,
代码来源:DakrorLauncher.java

示例2: addDownloadTile

点赞 3

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
private void addDownloadTile(HttpUtils.DownloadTask task) {
	final DownloadTile tile = new DownloadTile(task);
	Style.registerCssClasses(tile, ".tile");
	if (style != null) Style.apply(tile, style, styleStack);

       tile.setLocation(getNextTileX() + getWidth(), 2);

	Tween.to(tile, SLAnimator.ComponentAccessor.X, 2)
		.target(getNextTileX())
		.ease(Quad.OUT)
		.start(tweenManager);

	task.addListener(new DownloadListener() {
		@Override public void onUpdate(int length, int totalLength) {tile.setCurrentSize(length, totalLength);}
		@Override public void onComplete() {tile.setToComplete(); tile.disappear(3.5f);}
		@Override public void onError(IOException ex) {tile.setToError("IOException: " + ex.getMessage());}
	});

	add(tile);
	tiles.add(tile);
}
 

开发者ID:Drusy,
项目名称:freebox-v6-monitor,
代码行数:22,
代码来源:TaskPanel.java

示例3: initiatePanelConfigurations

点赞 3

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
private void initiatePanelConfigurations() {
	mainCfg = new SLConfig(panel)
	.row(1f).col(1f)
	.place(0, 0, uiMainMenuPanel);

	AboutCfg = new SLConfig(panel)
	.row(1f).col(1f)
	.place(0, 0, uiAboutPanel);
	
	DevTeamCfg = new SLConfig(panel)
	.row(1f).col(1f)
	.place(0, 0, uiDevTeamPanel);

	NewGameCfg = new SLConfig(panel)
	.row(1f).col(2f).col(1f)
	.place(0, 0, uiMainMenuPanel)
	.place(0, 1, uiNewGamePanel);
	
	GameCfg = new SLConfig(panel)
	.row(1f).col(1f)
	.place(0, 0, uiGamePanel);

	panel.setTweenManager(SLAnimator.createTweenManager());
	panel.initialize(mainCfg);
}
 

开发者ID:miguelgazela,
项目名称:stratego-vdm,
代码行数:26,
代码来源:UIGame.java

示例4: initComponents

点赞 2

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
public void initComponents() {
	state = LOGIN;
	
	TexturedPanel cp = new TexturedPanel(Game.getImage("background2.png"));
	cp.setLayout(new BorderLayout());
	cp.add(slPanel, BorderLayout.CENTER);
	
	alp = new AppListPanel();
	
	for (App app : AppLoader.apps)
		alp.add(new AppPanel(app));
	
	appListPane = new JScrollPane(alp);
	appListPane.setBorder(BorderFactory.createEmptyBorder());
	appListPane.setOpaque(false);
	appListPane.getViewport().setOpaque(false);
	
	setContentPane(cp);
	
	JLabel banner = new JLabel(new ImageIcon(Game.getImage("title.png").getScaledInstance(1000, 160, Image.SCALE_DEFAULT)));
	
	configs.put(LOGIN,
							new SLConfig(slPanel).gap(0, 0).row(250).row(1f).row(1f).row(1f).row(1f).col(1f).place(0, 0, banner).beginGrid(2, 0).row(1f).row(loginPanel.getHeight()).row(1f).col(	1f).col(loginPanel.getWidth()).col(	1f).place(1,
																																																																																																																	1,
																																																																																																																	loginPanel).endGrid());
	configs.put(MAIN, new SLConfig(slPanel).gap(0, 0).row(90).col(1f).place(0, 0, titlePanel).row(1f).place(1, 0, appListPane).row(32).place(2, 0, statusPanel));
	
	slPanel.setTweenManager(SLAnimator.createTweenManager());
	slPanel.initialize(configs.get(state));
}
 

开发者ID:Dakror,
项目名称:DakrorLauncher,
代码行数:31,
代码来源:DakrorLauncher.java

示例5: onEvent

点赞 2

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
@Override
public void onEvent(int type, BaseTween<?> source) {
	tiles.remove((Tile) source.getUserData());

	for (Tile tile : tiles) {
		tweenManager.killTarget(tile, SLAnimator.ComponentAccessor.X);
		Tween.to(tile, SLAnimator.ComponentAccessor.X, 2)
			.target(getTileX(tile))
			.ease(Quad.OUT)
			.start(tweenManager);
	}
}
 

开发者ID:Drusy,
项目名称:freebox-v6-monitor,
代码行数:13,
代码来源:TaskPanel.java

示例6: disappear

点赞 2

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
public void disappear(float delay) {
	Tween.to(this, SLAnimator.ComponentAccessor.Y, 0.3f)
		.targetRelative(50)
		.ease(Quad.IN)
		.delay(delay)
		.setCallback(tileRemovedCallback)
		.setUserData(this)
		.start(tweenManager);
}
 

开发者ID:Drusy,
项目名称:freebox-v6-monitor,
代码行数:10,
代码来源:TaskPanel.java

示例7: main

点赞 2

import aurelienribon.slidinglayout.SLAnimator; //导入依赖的package包/类
public static void main(String[] args) {
		System.out.println("Starting game!");
		SLAnimator.start();
		new UIGame();
		
//		Main self = new Main();
//		Scanner in = new Scanner(System.in);
//		int initialX, initialY, finalX, finalY;
//		
//		try {
//			Stratego stratego = new Stratego();
//			stratego.placeInitialPieces();
//			
//			while(true) {
//				System.out.println("Current player: "+stratego.getCurrentPlayer().getName());
//				self.printBoard(stratego.getBoard());
//				
//				System.out.println("Enter move coordinates <initialX> <initialY> <finalX> <finalY>");
//				initialX = in.nextInt();
//				initialY = in.nextInt();
//				finalX = in.nextInt();
//				finalY = in.nextInt();
//				
//				System.out.printf("Making move from (%d %d) to (%d %d)\n", initialX, initialY, finalX, finalY);
//				Number moveResult = stratego.makeMove(new Coord(initialX, initialY), new Coord(finalX, finalY));
//				
//				if(moveResult.intValue() == 0) {
//					if(stratego.isGameOver()) {
//						break;
//					} else {
//						stratego.updateTurn();
//					}
//				} else {
//					System.out.printf("Invalid Move: %d\n", moveResult.intValue());
//				}
//			}
//		} catch (CGException e) {
//			e.printStackTrace();
//		}
	}
 

开发者ID:miguelgazela,
项目名称:stratego-vdm,
代码行数:41,
代码来源:Main.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)