當前位置: 首頁>>代碼示例>>Java>>正文


Java DisplayRepaintListener類代碼示例

本文整理匯總了Java中org.microemu.app.ui.DisplayRepaintListener的典型用法代碼示例。如果您正苦於以下問題:Java DisplayRepaintListener類的具體用法?Java DisplayRepaintListener怎麽用?Java DisplayRepaintListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DisplayRepaintListener類屬於org.microemu.app.ui包,在下文中一共展示了DisplayRepaintListener類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: hideNotify

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
@Override
public void hideNotify()
{
    ((AndroidDeviceDisplay) activity.getEmulatorContext().getDeviceDisplay()).removeDisplayRepaintListener((DisplayRepaintListener) view);
    
    super.hideNotify();
}
 
開發者ID:Helltar,項目名稱:AMPASIDE,代碼行數:8,代碼來源:AndroidCanvasUI.java

示例2: showNotify

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
@Override
public void showNotify()
{
    super.showNotify();
    
    activity.post(new Runnable() {
        public void run() {
      ((AndroidDeviceDisplay) activity.getEmulatorContext().getDeviceDisplay()).addDisplayRepaintListener((DisplayRepaintListener) view);
      ((Canvas) displayable).repaint();
        }
    });
}
 
開發者ID:Helltar,項目名稱:AMPASIDE,代碼行數:13,代碼來源:AndroidCanvasUI.java

示例3: paintDisplayable

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void paintDisplayable(int x, int y, int width, int height) {
       rectangle.left = x;
       rectangle.top = y;
       rectangle.right = x + width;
       rectangle.bottom = y + height;
       for (int i = 0; i < displayRepaintListeners.size(); i++) {
           DisplayRepaintListener l = displayRepaintListeners.get(i);
           if (l != null) {
               l.repaintInvoked(rectangle);    
           }
       }
}
 
開發者ID:Helltar,項目名稱:AMPASIDE,代碼行數:13,代碼來源:AndroidDeviceDisplay.java

示例4: addDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void addDisplayRepaintListener(DisplayRepaintListener listener) {
    displayRepaintListeners.add(listener);
}
 
開發者ID:Helltar,項目名稱:AMPASIDE,代碼行數:4,代碼來源:AndroidDeviceDisplay.java

示例5: removeDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void removeDisplayRepaintListener(DisplayRepaintListener listener) {
    displayRepaintListeners.remove(listener);
}
 
開發者ID:Helltar,項目名稱:AMPASIDE,代碼行數:4,代碼來源:AndroidDeviceDisplay.java

示例6: addDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void addDisplayRepaintListener(DisplayRepaintListener l)
{
	displayRepaintListener = l;
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:5,代碼來源:SwtDisplayComponent.java

示例7: removeDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void removeDisplayRepaintListener(DisplayRepaintListener l)
{
	if (displayRepaintListener == l) {
		displayRepaintListener = null;
	}
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:7,代碼來源:SwtDisplayComponent.java

示例8: actionPerformed

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void actionPerformed(ActionEvent e) {
	if (captureFileChooser == null) {
		ExtensionFileFilter fileFilter = new ExtensionFileFilter("GIF files");
		fileFilter.addExtension("gif");
		captureFileChooser = new JFileChooser();
		captureFileChooser.setFileFilter(fileFilter);
		captureFileChooser.setDialogTitle("Capture to GIF File...");
		captureFileChooser.setCurrentDirectory(new File(Config.getRecentDirectory("recentCaptureDirectory")));
	}

	if (captureFileChooser.showSaveDialog(Main.this) == JFileChooser.APPROVE_OPTION) {
		Config.setRecentDirectory("recentCaptureDirectory", captureFileChooser.getCurrentDirectory()
				.getAbsolutePath());
		String name = captureFileChooser.getSelectedFile().getName();
		if (!name.toLowerCase().endsWith(".gif") && name.indexOf('.') == -1) {
			name = name + ".gif";
		}
		File captureFile = new File(captureFileChooser.getSelectedFile().getParentFile(), name);
		if (!allowOverride(captureFile)) {
			return;
		}

		encoder = new AnimatedGifEncoder();
		encoder.start(captureFile.getAbsolutePath());

		menuStartCapture.setEnabled(false);
		menuStopCapture.setEnabled(true);

		emulatorContext.getDisplayComponent().addDisplayRepaintListener(new DisplayRepaintListener() {
			long start = 0;

			public void repaintInvoked(MutableImage image) {
				synchronized (Main.this) {
					if (encoder != null) {
						if (start == 0) {
							start = System.currentTimeMillis();
						} else {
							long current = System.currentTimeMillis();
							encoder.setDelay((int) (current - start));
							start = current;
						}

						encoder.addFrame((BufferedImage) ((J2SEMutableImage) image).getImage());
					}
				}
			}
		});
	}
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:50,代碼來源:Main.java

示例9: addDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void addDisplayRepaintListener(DisplayRepaintListener l) {
	displayRepaintListener = l;
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:4,代碼來源:SwingDisplayComponent.java

示例10: removeDisplayRepaintListener

import org.microemu.app.ui.DisplayRepaintListener; //導入依賴的package包/類
public void removeDisplayRepaintListener(DisplayRepaintListener l) {
	if (displayRepaintListener == l) {
		displayRepaintListener = null;
	}
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:6,代碼來源:SwingDisplayComponent.java


注:本文中的org.microemu.app.ui.DisplayRepaintListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。