本文整理汇总了Java中org.apache.harmony.awt.wtk.CreationParams.DECOR_TYPE_POPUP属性的典型用法代码示例。如果您正苦于以下问题:Java CreationParams.DECOR_TYPE_POPUP属性的具体用法?Java CreationParams.DECOR_TYPE_POPUP怎么用?Java CreationParams.DECOR_TYPE_POPUP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.harmony.awt.wtk.CreationParams
的用法示例。
在下文中一共展示了CreationParams.DECOR_TYPE_POPUP属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStyleEx
private static int getStyleEx(CreationParams p) {
int styleEx = 0;
if (p.topmost) {
styleEx |= WindowsDefs.WS_EX_TOPMOST;
}
switch(p.decorType) {
case CreationParams.DECOR_TYPE_FRAME:
styleEx |= WindowsDefs.WS_EX_APPWINDOW; // Show in taskbar
break;
case CreationParams.DECOR_TYPE_POPUP:
styleEx |= WindowsDefs.WS_EX_NOACTIVATE;
break;
}
return styleEx;
}
示例2: WinWindow
WinWindow(long hwnd, WinWindowFactory factory, CreationParams cp) {
this.hwnd = hwnd;
this.factory = factory;
focusable = true;
if (cp != null) {
child = cp.child;
iconified = cp.iconified;
maximized = (cp.maximizedState == cp.MAXIMIZED);
popup = (cp.decorType == CreationParams.DECOR_TYPE_POPUP);
undecorated = (cp.decorType == CreationParams.DECOR_TYPE_UNDECOR) ||
cp.undecorated || popup;
focusable = (cp.decorType != CreationParams.DECOR_TYPE_POPUP);
} else {
undecorated = false;
child = false;
popup = false;
}
}
示例3: getStyle
private static int getStyle(CreationParams p) {
int style = WindowsDefs.WS_CLIPCHILDREN|WindowsDefs.WS_CLIPSIBLINGS;
style |= p.child ? WindowsDefs.WS_CHILD : WindowsDefs.WS_POPUP;
switch (p.decorType) {
case CreationParams.DECOR_TYPE_FRAME:
style |= WindowsDefs.WS_SYSMENU | WindowsDefs.WS_MINIMIZEBOX;
if (!p.undecorated) {
style |= WindowsDefs.WS_CAPTION | WindowsDefs.WS_BORDER |
WindowsDefs.WS_MAXIMIZEBOX | WindowsDefs.WS_SIZEBOX; }
break;
case CreationParams.DECOR_TYPE_DIALOG:
style |= WindowsDefs.WS_SYSMENU;
if (!p.undecorated) {
style |= WindowsDefs.WS_CAPTION | WindowsDefs.WS_BORDER | WindowsDefs.WS_SIZEBOX;
}
break;
case CreationParams.DECOR_TYPE_POPUP:
break;
case CreationParams.DECOR_TYPE_UNDECOR:
break;
}
if (p.visible) {
style |= WindowsDefs.WS_VISIBLE;
}
if (p.disabled) {
style |= WindowsDefs.WS_DISABLED;
}
if (p.iconified) {
style |= WindowsDefs.WS_MINIMIZE;
}
if (p.maximizedState == p.MAXIMIZED) {
style |= WindowsDefs.WS_MAXIMIZE;
}
return style;
}
示例4: createNativeWindow
NativeWindow createNativeWindow(Component c) {
if (c instanceof Window) {
windows.add(c);
}
Component parent = null;
Point location = c.getLocation();
CreationParams cp = new CreationParams();
cp.child = !(c instanceof Window);
cp.disabled = !c.isEnabled();
if (c instanceof Window) {
Window w = (Window) c;
cp.resizable = w.isResizable();
cp.undecorated = w.isUndecorated();
parent = w.getOwner();
cp.locationByPlatform = w.locationByPlatform;
if (c instanceof Frame) {
Frame frame = (Frame) c;
int state = frame.getExtendedState();
cp.name = frame.getTitle();
cp.iconified = (state & Frame.ICONIFIED) != 0;
cp.maximizedState = 0;
if ((state & Frame.MAXIMIZED_BOTH) != 0) {
cp.maximizedState |= cp.MAXIMIZED;
}
if ((state & Frame.MAXIMIZED_HORIZ) != 0) {
cp.maximizedState |= cp.MAXIMIZED_HORIZ;
}
if ((state & Frame.MAXIMIZED_VERT) != 0) {
cp.maximizedState |= cp.MAXIMIZED_VERT;
}
cp.decorType = CreationParams.DECOR_TYPE_FRAME;
} else if (c instanceof Dialog) {
Dialog dlg = (Dialog) c;
cp.name = dlg.getTitle();
cp.decorType = CreationParams.DECOR_TYPE_DIALOG;
} else if (w.isPopup()) {
cp.decorType = CreationParams.DECOR_TYPE_POPUP;
} else {
cp.decorType = CreationParams.DECOR_TYPE_UNDECOR;
}
} else {
parent = c.getHWAncestor();
cp.name = c.getName();
//set location relative to the nearest heavy weight ancestor
location = MouseDispatcher.convertPoint(c, 0, 0, parent);
}
if (parent != null) {
NativeWindow nativeParent = parent.getNativeWindow();
if (nativeParent == null) {
if (cp.child) {
return null; //component's window will be created when its parent is created ???
}
parent.mapToDisplay(true); //TODO: verify it
nativeParent = parent.getNativeWindow();
}
cp.parentId = nativeParent.getId();
}
cp.x = location.x;
cp.y = location.y;
cp.w = c.getWidth();
cp.h = c.getHeight();
recentNativeWindowComponent = c;
NativeWindow win = getWindowFactory().createWindow(cp);
nativeWindowCreated(win);
if (c instanceof Window) {
shutdownWatchdog.setWindowListEmpty(false);
}
return win;
}