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


Java PeerType类代码示例

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


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

示例1: createPlatformWindow

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
@Override
protected PlatformWindow createPlatformWindow(PeerType peerType) {
    if (peerType == PeerType.EMBEDDED_FRAME) {
        return new CPlatformEmbeddedFrame();
    } else if (peerType == PeerType.VIEW_EMBEDDED_FRAME) {
        return new CViewPlatformEmbeddedFrame();
    } else if (peerType == PeerType.LW_FRAME) {
        return new CPlatformLWWindow();
    } else {
        assert (peerType == PeerType.SIMPLEWINDOW
                || peerType == PeerType.DIALOG
                || peerType == PeerType.FRAME);
        return new CPlatformWindow();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:LWCToolkit.java

示例2: createCPrinterDialog

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
private CPrinterDialogPeer createCPrinterDialog(CPrinterDialog target) {
    PlatformComponent platformComponent = createPlatformComponent();
    PlatformWindow platformWindow = createPlatformWindow(PeerType.DIALOG);
    CPrinterDialogPeer peer = new CPrinterDialogPeer(target, platformComponent, platformWindow);
    targetCreatedPeer(target, peer);
    return peer;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:LWCToolkit.java

示例3: applyProperty

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
public void applyProperty(final CPlatformWindow c, final Object value) {
    boolean zoomable = Boolean.parseBoolean(value.toString());
    if (c.target instanceof RootPaneContainer
            && c.getPeer().getPeerType() == PeerType.FRAME) {
        if (c.isInFullScreen && !zoomable) {
            c.toggleFullScreen();
        }
    }
    c.setStyleBits(ZOOMABLE, zoomable);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:11,代码来源:CPlatformWindow.java

示例4: toFront

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
@Override  // PlatformWindow
public void toFront() {
    LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit();
    Window w = DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    if( w != null && acc.getPeer(w) != null
            && ((LWWindowPeer)acc.getPeer(w)).getPeerType() == LWWindowPeer.PeerType.EMBEDDED_FRAME
            && !lwcToolkit.isApplicationActive()) {
        lwcToolkit.activateApplicationIgnoringOtherApps();
    }
    updateFocusabilityForAutoRequestFocus(false);
    execute(CPlatformWindow::nativePushNSWindowToFront);
    updateFocusabilityForAutoRequestFocus(true);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:CPlatformWindow.java

示例5: setCanFullscreen

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
private void setCanFullscreen(final boolean canFullScreen) {
    if (target instanceof RootPaneContainer
            && getPeer().getPeerType() == PeerType.FRAME) {

        if (isInFullScreen && !canFullScreen) {
            toggleFullScreen();
        }

        final RootPaneContainer rpc = (RootPaneContainer) target;
        rpc.getRootPane().putClientProperty(
                CPlatformWindow.WINDOW_FULLSCREENABLE, canFullScreen);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:14,代码来源:CPlatformWindow.java

示例6: createPlatformWindow

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
@Override
protected PlatformWindow createPlatformWindow(PeerType peerType) {
    if (peerType == PeerType.EMBEDDED_FRAME) {
        return new CPlatformEmbeddedFrame();
    } else if (peerType == PeerType.VIEW_EMBEDDED_FRAME) {
        return new CViewPlatformEmbeddedFrame();
    } else if (peerType == PeerType.LW_FRAME) {
        return new CPlatformLWWindow();
    } else {
        assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME);
        return new CPlatformWindow();
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:14,代码来源:LWCToolkit.java

示例7: createPlatformWindow

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
@Override
protected PlatformWindow createPlatformWindow(PeerType peerType) {
    if (peerType == PeerType.EMBEDDED_FRAME) {
        return new CPlatformEmbeddedFrame();
    } else if (peerType == PeerType.VIEW_EMBEDDED_FRAME) {
        return new CViewPlatformEmbeddedFrame();
    } else {
        assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME);
        return new CPlatformWindow();
    }
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:12,代码来源:LWCToolkit.java

示例8: createEmbeddedFrame

import sun.lwawt.LWWindowPeer.PeerType; //导入依赖的package包/类
LWWindowPeer createEmbeddedFrame(CEmbeddedFrame target) {
    PlatformComponent platformComponent = createPlatformComponent();
    PlatformWindow platformWindow = createPlatformWindow(PeerType.EMBEDDED_FRAME);
    return createDelegatedPeer(target, platformComponent, platformWindow, PeerType.EMBEDDED_FRAME);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:LWCToolkit.java


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