本文整理汇总了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();
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
}
示例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();
}
}
示例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();
}
}
示例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);
}