• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Display类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
    Window window = new Window();
    window.open(display);
    /*
    AlbumSearch albumSearch = new AlbumSearch(1L, "Hell\u00f6 W\u00f6rld", "The? Cool & Groovy \u00c4rtist", false, false);
    new ShareAction(window, albumSearch).perform(null);
    */
    Song song1 = new Song();
    song1.setSongID(1000L);
    song1.setSongName("S\u00f6ng 2 & S\u00f6ng 3");
    song1.setArtistName("Bl\u00fcr");
    Song song2 = new Song();
    song2.setSongID(1004L);
    song2.setSongName("Caravan? Of L\u00f6ve");
    song2.setArtistName("The Housem\u00e4rtins");
    List<Song> songs = new ArrayList<>(song1, song2);
    new ShareAction(window, songs).perform(null);
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:20,代码来源:ShareAction.java


示例2: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override public void startup(Display display, Map<String, String> properties) throws Exception// App start
{
    Out.print(LOG_LEVEL.DEBUG, "Data loaded to memory");
    
    Locale.setDefault(Locale.ENGLISH);// Set default UI language to English
    BXMLSerializer bxmlSerializer = new BXMLSerializer();
    window = (Window) bxmlSerializer.readObject(getClass().getResource("master.bxml"));
    window.open(display);

    // Helper launch if first time
    if (facade.appConfig.isHelp()) {
        helper.open(window);
        facade.appConfig.setHelp(false);
    }
    
    Out.print(LOG_LEVEL.DEBUG, "Window open");
}
 
开发者ID:DevComPack,项目名称:setupmaker,代码行数:18,代码来源:Master.java


示例3: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
    BXMLSerializer bxmlSerializer = new BXMLSerializer();
 window = (DissectorWindow) bxmlSerializer.readObject(getClass().getResource("application.xml"));
 window.open(display);

 //ExtendedRandomAccessFile in = open(getClass(), "JavaClassDissector.class" );
 //JavaClassDissector dissector = new JavaClassDissector().read(in);

 //String filename = "/home/bramp/personal/dissector/dissector-core/src/test/resources/net/bramp/dissector/png/z00n2c08.png";
 //String filename = "/home/bramp/personal/dissector/dissector-core/target/classes/net/bramp/dissector/java/JavaClassDissector.class";
 //String filename = "/home/bramp/src/transcoder/samples/lane_bryant/6th_and_Lane_480_RK2 RF22 F24 A32 H240.mp4";
 //String filename = "/home/bramp/personal/dissector/dissector-core/src/test/resources/net/bramp/dissector/torrent/KNOPPIX 7.2.0 DVD.torrent";
 String filename = "/home/bramp/personal/dissector/dissector-core/src/test/resources/net/bramp/dissector/zip/test.zip";
 ExtendedRandomAccessFile file = new ExtendedRandomAccessFile(filename, "r");

 //window.loadDissector(file, new PngDissector());
 //window.loadDissector(file, new JavaClassDissector());
 //window.loadDissector(file, new IsoDissector());
 //window.loadDissector(file, new TorrentDissector());
 window.loadDissector(file, new ZipDissector());

}
 
开发者ID:bramp,项目名称:dissector,代码行数:24,代码来源:DissectorApplication.java


示例4: main

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
public static void main(String[] args) {
    String applicationClassName = args[0];
    final LumpiApplication<?, ?> application;

    try {
        application = (LumpiApplication<?, ?>) ClassLoader.getSystemClassLoader().loadClass(
                applicationClassName).newInstance();
        if (application != null) {
            final Display display =
                    application.getApplicationContext().getHostFrame().getDisplay();

            ApplicationContext.queueCallback(() -> {
                try {
                    application.startup(display, new HashMap<>());
                } catch (Exception exception) {
                    ApplicationContext.handleUncaughtException(exception);
                }
            });
        }
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) {
        Logger.getLogger(ApplicationLauncher.class.getName()).log(Level.SEVERE, null, ex);
    }
}
 
开发者ID:moosbusch,项目名称:Lumpi,代码行数:24,代码来源:ApplicationLauncher.java


示例5: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
    // fix a bug in Pivot: replace the Tooltip skin class to set the background color of tooltips properly
    Theme.getTheme().set(Tooltip.class, FixedTerraTooltipSkin.class);

    this.resources = new Resources("groovejames.gui.resources");
    this.display = display;
    this.settings = Settings.load();
    this.downloadTracks.getListListeners().add(new DownloadTracksListListener());
    this.imageLoader = new ImageLoader();

    Services.getPlayService().setListener(new PlaylistListener());
    Services.getPlayService().getPlaylist().getListListeners().add(new PlaylistListListener());
    Services.applySettings(settings);

    initActions();
    window = createWindow();
    initShortcuts();
    initComponents();
    window.open(display);
    searchField.requestFocus();

    addClipboardListeners();
    Services.getWatchClipboardTask().checkNow();

    log.info("GUI initialized");
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:28,代码来源:Main.java


示例6: tooltipTriggered

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void tooltipTriggered(Component component, int x, int y) {
    String tooltipText = component.getTooltipText();
    if (!isNullOrEmpty(tooltipText)) {
        Display display = component.getDisplay();
        Point location = component.mapPointToAncestor(display, x, y);
        int tooltipX = location.x + 16;
        int tooltipY = location.y;
        TextArea content = new TextArea();
        content.getStyles().put("wrapText", Boolean.TRUE);
        content.getStyles().put("margin", new Insets(0));
        content.setPreferredWidth(Math.min(display.getWidth() - tooltipX, getStringWidth(tooltipText, (Font) content.getStyles().get("font"))));
        content.setText(tooltipText);
        Tooltip tooltip = new Tooltip(content);
        int tooltipWidth = tooltip.getPreferredWidth();
        int tooltipHeight = tooltip.getPreferredHeight();
        // ensure tooltip is inside display's bounds
        if (tooltipX + tooltipWidth > display.getWidth()) {
            tooltipX -= tooltipX + tooltipWidth - display.getWidth();
        }
        if (tooltipY + tooltipHeight > display.getHeight()) {
            tooltipY -= tooltipHeight;
        }
        tooltip.setLocation(tooltipX, tooltipY);
        tooltip.open(component.getWindow());
    }
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:28,代码来源:TooltipTableMouseListener.java


示例7: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
public void startup(Display display, Map<String, String> properties) throws Exception {
    final TextArea errorText = new TextArea();
    errorText.setEditable(false);
    errorText.getStyles().put("wrapText", true);
    errorText.getStyles().put("backgroundColor", Color.YELLOW);
    errorText.setText(getLongText());
    ScrollPane scrollPane = new ScrollPane(FILL, AUTO);
    scrollPane.getStyles().put("backgroundColor", Color.BLUE);
    scrollPane.setView(errorText);
    Window window = new Window(scrollPane);
    window.setMaximized(true);
    window.open(display);
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:14,代码来源:TextAreaTest.java


示例8: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
  public void startup(final Display display, Map<String, String> map) throws Exception {
MosaicPane mosaicPane = new MosaicPane();
mosaicPane.getComponentKeyListeners().add(getKeyListener());

ModelLoader loader = new ModelLoader(map.get("file"));
String[] model = loader.getModel(map.get("surface"));

System.out.println("model.length = " + model.length);

int i = 0;
for(String def : model) {
	String[] args = def.split("[\\s]*\\,[\\s]*");
	int offset = args.length > 4 ? args.length - 4 : 0;
	String id = args.length == 4 ? "" + (i++) : args[0];
	Label l = getLabel(i > 4 ? colors[random.nextInt(5)] : colors[i], id);
	mosaicPane.add(l, id, 
		Double.parseDouble(args[offset + 0]), 
		Double.parseDouble(args[offset + 1]),
		Double.parseDouble(args[offset + 2]),
		Double.parseDouble(args[offset + 3]));
	clientMap.put(id, l);
}

//Now that we've added the definitions and components to the Surface we can add it to the Engine.
mosaicPane.getEngine().addSurface(mosaicPane.getSurface());

window.setContent(mosaicPane);
      window.setTitle("Mosaic Layout Engine Demo (Pivot)");
      window.setMaximized(true);
      window.open(display);
      
      addMouseHandler(mosaicPane);
  }
 
开发者ID:fxpresso,项目名称:Mosaic,代码行数:35,代码来源:MosaicPaneRefImpl.java


示例9: collectModuleBindings

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
protected void collectModuleBindings(@Nonnull Collection<Module> modules) {
    modules.add(new AbstractModule() {
        @Override
        protected void doConfigure() {
            bind(Display.class)
                .toInstance(display);
        }
    });
    super.collectModuleBindings(modules);
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:12,代码来源:PivotApplicationBootstrapper.java


示例10: createApplicationBootstrapper

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Nonnull
@Override
@SuppressWarnings("ConstantConditions")
protected ApplicationBootstrapper createApplicationBootstrapper(@Nonnull Display display) {
    ApplicationBootstrapper bootstrapper = new TestPivotApplicationBootstrapper(this, display);
    if (bootstrapper instanceof TestCaseAware) {
        ((TestCaseAware) bootstrapper).setTestCase(testCase);
    }
    return bootstrapper;
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:11,代码来源:TestDesktopPivotApplication.java


示例11: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
	System.out.println("startup()");
	BXMLSerializer bxml = new BXMLSerializer();
	Window window = (Window) bxml.readObject(PlayerSimulatorApplication.class,
			"PlayerSimulatorWindow.bxml");
	window.open(display);
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:9,代码来源:PlayerSimulatorApplication.java


示例12: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, org.apache.pivot.collections.Map<String, String> properties) throws Exception {
	System.out.println("startup()");
	
	BXMLSerializer bxml = new BXMLSerializer();
	_window = (Window) bxml.readObject(WorldSimulatorWindow.class, "window.bxml");
	_window.open(display);
}
 
开发者ID:lumannnn,项目名称:AudioRacer,代码行数:9,代码来源:WorldSimulatorWindow.java


示例13: getDisplay

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
public Display getDisplay() {
    return display;
}
 
开发者ID:groovejames,项目名称:groovejames,代码行数:4,代码来源:Main.java


示例14: open

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override public void open(Display display, Window owner, DialogCloseListener dialogCloseListenerArgument)
{
    inGroupName.setText("");
    validated=false;
    super.open(display, owner, dialogCloseListenerArgument);
}
 
开发者ID:DevComPack,项目名称:setupmaker,代码行数:7,代码来源:NGDialog.java


示例15: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public final void startup(Display display, Map<String, String> properties) throws Exception {
    getApplicationContext().initializeGUI();
}
 
开发者ID:moosbusch,项目名称:Lumpi,代码行数:5,代码来源:AbstractLumpiApplication.java


示例16: getDisplay

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
public final Display getDisplay() {
    return getDisplayHost().getDisplay();
}
 
开发者ID:moosbusch,项目名称:Lumpi,代码行数:4,代码来源:HostFrame.java


示例17: DefaultPivotWindowDisplayHandler

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Inject
public DefaultPivotWindowDisplayHandler(@Nonnull Display display) {
    this.display = requireNonNull(display, "Argument 'display' cannot be null");
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:5,代码来源:DefaultPivotWindowDisplayHandler.java


示例18: PivotApplicationBootstrapper

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
public PivotApplicationBootstrapper(@Nonnull GriffonApplication application, @Nonnull Display display) {
    super(application);
    this.display = display;
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:5,代码来源:PivotApplicationBootstrapper.java


示例19: windowClosed

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
/**
 * Triggers a <tt>WindowHidden</tt> event with the window as sole argument
 */
public void windowClosed(Window arg0, Display arg1, Window arg2) {
    event(ApplicationEvent.WINDOW_HIDDEN, asList(arg0));
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:7,代码来源:DefaultPivotWindowManager.java


示例20: startup

import org.apache.pivot.wtk.Display; //导入依赖的package包/类
@Override
public void startup(Display display, org.apache.pivot.collections.Map<String, String> properties) throws Exception {
    ApplicationBootstrapper bootstrapper = createApplicationBootstrapper(display);
    bootstrapper.bootstrap();
    afterStartup();
}
 
开发者ID:aalmiray,项目名称:griffon2,代码行数:7,代码来源:AbstractPivotGriffonApplication.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java QueryExecUtils类代码示例发布时间:2022-05-22
下一篇:
Java VisualTable类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap