本文整理汇总了Java中sun.util.logging.PlatformLogger类的典型用法代码示例。如果您正苦于以下问题:Java PlatformLogger类的具体用法?Java PlatformLogger怎么用?Java PlatformLogger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlatformLogger类属于sun.util.logging包,在下文中一共展示了PlatformLogger类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: coalescePaintEvent
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
@Override
public void coalescePaintEvent(PaintEvent e) {
Rectangle r = e.getUpdateRect();
if (!(e instanceof IgnorePaintEvent)) {
paintArea.add(r, e.getID());
}
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
switch(e.getID()) {
case PaintEvent.UPDATE:
log.finest("coalescePaintEvent: UPDATE: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
case PaintEvent.PAINT:
log.finest("coalescePaintEvent: PAINT: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:WComponentPeer.java
示例2: LogEvent
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
private LogEvent(BootstrapLogger bootstrap,
PlatformLogger.Level platformLevel,
String sourceClass, String sourceMethod,
ResourceBundle bundle, String msg,
Throwable thrown, Object[] params) {
this.acc = AccessController.getContext();
this.timeMillis = System.currentTimeMillis();
this.nanoAdjustment = VM.getNanoTimeAdjustment(timeMillis);
this.level = null;
this.platformLevel = platformLevel;
this.bundle = bundle;
this.msg = msg;
this.msgSupplier = null;
this.thrown = thrown;
this.params = params;
this.sourceClass = sourceClass;
this.sourceMethod = sourceMethod;
this.bootstrap = bootstrap;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:BootstrapLogger.java
示例3: getPeer
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
/**
* Returns peer of the given client component. If the given client component
* doesn't have peer, peer of the native container of the client is returned.
*/
protected ComponentPeer getPeer(Component client) {
XComponentPeer peer;
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Client is " + client);
}
peer = (XComponentPeer)XToolkit.targetToPeer(client);
while (client != null && peer == null) {
client = getParent(client);
peer = (XComponentPeer)XToolkit.targetToPeer(client);
}
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Peer is {0}, client is {1}", peer, client);
}
if (peer != null)
return peer;
return null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:XInputMethod.java
示例4: processClientMessage
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
static boolean processClientMessage(XEvent xev, int screen) {
XClientMessageEvent xce = xev.get_xclient();
if (xce.get_message_type() == XA_MANAGER.getAtom()) {
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("client messags = " + xce);
}
long timestamp = xce.get_data(0);
long atom = xce.get_data(1);
long owner = xce.get_data(2);
long data = xce.get_data(3);
XMSelection sel = getInstance(atom);
if (sel != null) {
sel.resetOwner(owner,screen);
sel.dispatchOwnerChangedEvent(xev,screen,owner,data, timestamp);
}
}
return false;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:XMSelection.java
示例5: addEventFilter
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void addEventFilter(EventFilter filter) {
if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("adding the event filter: " + filter);
}
synchronized (eventFilters) {
if (!eventFilters.contains(filter)) {
if (filter instanceof ModalEventFilter) {
ModalEventFilter newFilter = (ModalEventFilter)filter;
int k = 0;
for (k = 0; k < eventFilters.size(); k++) {
EventFilter f = eventFilters.get(k);
if (f instanceof ModalEventFilter) {
ModalEventFilter cf = (ModalEventFilter)f;
if (cf.compareTo(newFilter) > 0) {
break;
}
}
}
eventFilters.add(k, filter);
} else {
eventFilters.add(filter);
}
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:EventDispatchThread.java
示例6: preInit
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void preInit(XCreateWindowParams params) {
super.preInit(params);
winAttr.initialFocus = true;
currentInsets = new Insets(0,0,0,0);
applyGuessedInsets();
Rectangle bounds = (Rectangle)params.get(BOUNDS);
dimensions = new WindowDimensions(bounds, getRealInsets(), false);
params.put(BOUNDS, dimensions.getClientRect());
if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Initial dimensions {0}", dimensions);
}
// Deny default processing of these events on the shell - proxy will take care of
// them instead
Long eventMask = (Long)params.get(EVENT_MASK);
params.add(EVENT_MASK, Long.valueOf(eventMask.longValue() & ~(XConstants.FocusChangeMask | XConstants.KeyPressMask | XConstants.KeyReleaseMask)));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:XDecoratedPeer.java
示例7: detachChild
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void detachChild() {
if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
}
/**
* XEmbed specification:
* "The embedder can unmap the client and reparent the client window to the root window. If the
* client receives an ReparentNotify event, it should check the parent field of the XReparentEvent
* structure. If this is the root window of the window's screen, then the protocol is finished and
* there is no further interaction. If it is a window other than the root window, then the protocol
* continues with the new parent acting as the embedder window."
*/
XToolkit.awtLock();
try {
XlibWrapper.XUnmapWindow(XToolkit.getDisplay(), xembed.handle);
XlibWrapper.XReparentWindow(XToolkit.getDisplay(), xembed.handle, XToolkit.getDefaultRootWindow(), 0, 0);
} finally {
XToolkit.awtUnlock();
}
endDispatching();
xembed.handle = 0;
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:23,代码来源:XEmbedCanvasPeer.java
示例8: sendMessage
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void sendMessage(long window, int message, long detail, long data1, long data2) {
XClientMessageEvent msg = new XClientMessageEvent();
msg.set_type((int)XConstants.ClientMessage);
msg.set_window(window);
msg.set_message_type(XEmbed.getAtom());
msg.set_format(32);
msg.set_data(0, XToolkit.getCurrentServerTime());
msg.set_data(1, message);
msg.set_data(2, detail);
msg.set_data(3, data1);
msg.set_data(4, data2);
XToolkit.awtLock();
try {
if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Sending " + XEmbedMessageToString(msg));
}
XlibWrapper.XSendEvent(XToolkit.getDisplay(), window, false, XConstants.NoEventMask, msg.pData);
}
finally {
XToolkit.awtUnlock();
}
msg.dispose();
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:24,代码来源:XEmbedHelper.java
示例9: addTrayIcon
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void addTrayIcon(XTrayIconPeer tiPeer) throws AWTException {
long selection_owner = selection.getOwner(SCREEN);
if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(" send SYSTEM_TRAY_REQUEST_DOCK message to owner: " + selection_owner);
}
if (selection_owner == XConstants.None) {
throw new AWTException("TrayIcon couldn't be displayed.");
}
long tray_window = tiPeer.getWindow();
long data[] = new long[] {XEmbedHelper.XEMBED_VERSION, XEmbedHelper.XEMBED_MAPPED};
long data_ptr = Native.card32ToData(data);
_XEMBED_INFO.setAtomData(tray_window, data_ptr, data.length);
sendMessage(selection_owner, SYSTEM_TRAY_REQUEST_DOCK, tray_window, 0, 0);
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:20,代码来源:XSystemTrayPeer.java
示例10: mixOnShowing
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
@Override
void mixOnShowing() {
synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
boolean isLightweight = isLightweight();
if (isLightweight && isRecursivelyVisibleUpToHeavyweightContainer()) {
recursiveShowHeavyweightChildren();
}
if (!isMixingNeeded()) {
return;
}
if (!isLightweight || (isLightweight && hasHeavyweightDescendants())) {
recursiveApplyCurrentShape();
}
super.mixOnShowing();
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:Container.java
示例11: dispatchEventImpl
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
/**
* Called from dispatchEvent() under a correct AccessControlContext
*/
private void dispatchEventImpl(final AWTEvent event, final Object src) {
event.isPosted = true;
if (event instanceof ActiveEvent) {
// This could become the sole method of dispatching in time.
setCurrentEventAndMostRecentTimeImpl(event);
((ActiveEvent)event).dispatch();
} else if (src instanceof Component) {
((Component)src).dispatchEvent(event);
event.dispatched();
} else if (src instanceof MenuComponent) {
((MenuComponent)src).dispatchEvent(event);
} else if (src instanceof TrayIcon) {
((TrayIcon)src).dispatchEvent(event);
} else if (src instanceof AWTAutoShutdown) {
if (noEvents()) {
dispatchThread.stopDispatching();
}
} else {
if (getEventLog().isLoggable(PlatformLogger.Level.FINE)) {
getEventLog().fine("Unable to dispatch event: " + event);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:EventQueue.java
示例12: canAccessSystemClipboard
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
private boolean canAccessSystemClipboard() {
boolean b = false;
if (!GraphicsEnvironment.isHeadless()) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
try {
sm.checkPermission(SecurityConstants.AWT.ACCESS_CLIPBOARD_PERMISSION);
b = true;
} catch (SecurityException se) {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
}
}
} else {
b = true;
}
}
return b;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:InputEvent.java
示例13: forwardKeyEvent
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void forwardKeyEvent(KeyEvent e) {
xembedLog.fine("Try to forward key event");
byte[] bdata = getBData(e);
long data = Native.toData(bdata);
if (data == 0) {
return;
}
try {
XKeyEvent ke = new XKeyEvent(data);
ke.set_window(xembed.handle);
if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Forwarding native key event: " + ke);
}
XToolkit.awtLock();
try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data);
} finally {
XToolkit.awtUnlock();
}
} finally {
XlibWrapper.unsafe.freeMemory(data);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:XEmbedCanvasPeer.java
示例14: setShellNotResizable
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds,
boolean justChangeSize)
{
if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
", shellBounds " + shellBounds +", just change size: " + justChangeSize);
}
XToolkit.awtLock();
try {
/* Fix min/max size hints at the specified values */
if (!shellBounds.isEmpty()) {
window.updateSizeHints(newDimensions);
requestWMExtents(window.getWindow());
XToolkit.XSync();
XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), window.getShell(),
shellBounds.x, shellBounds.y, shellBounds.width, shellBounds.height);
}
if (!justChangeSize) { /* update decorations */
setShellDecor(window);
}
} finally {
XToolkit.awtUnlock();
}
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:25,代码来源:XWM.java
示例15: of
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
public static LogEvent of(long sequenceNumber,
boolean isLoggable, String name,
String className, String methodName,
sun.util.logging.PlatformLogger.Level level, ResourceBundle bundle,
Supplier<String> supplier, Throwable thrown, Object... params) {
LogEvent evt = new LogEvent(sequenceNumber);
evt.loggerName = name;
evt.level = level;
evt.args = params;
evt.bundle = bundle;
evt.thrown = thrown;
evt.supplier = supplier;
evt.isLoggable = isLoggable;
evt.className = className;
evt.methodName = methodName;
return evt;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:LoggerBridgeTest.java
示例16: preInit
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void preInit(XCreateWindowParams params) {
super.preInit(params);
winAttr.initialFocus = true;
currentInsets = new Insets(0,0,0,0);
if (XWM.getWMID() == XWM.UNITY_COMPIZ_WM) {
currentInsets = lastKnownInsets.get(getClass());
}
applyGuessedInsets();
Rectangle bounds = (Rectangle)params.get(BOUNDS);
dimensions = new WindowDimensions(bounds, getRealInsets(), false);
params.put(BOUNDS, dimensions.getClientRect());
if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Initial dimensions {0}", dimensions);
}
// Deny default processing of these events on the shell - proxy will take care of
// them instead
Long eventMask = (Long)params.get(EVENT_MASK);
params.add(EVENT_MASK, Long.valueOf(eventMask.longValue() & ~(XConstants.FocusChangeMask | XConstants.KeyPressMask | XConstants.KeyReleaseMask)));
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:XDecoratedPeer.java
示例17: canAccessSystemClipboard
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
private boolean canAccessSystemClipboard() {
boolean b = false;
if (!GraphicsEnvironment.isHeadless()) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
try {
sm.checkPermission(AWTPermissions.ACCESS_CLIPBOARD_PERMISSION);
b = true;
} catch (SecurityException se) {
if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
}
}
} else {
b = true;
}
}
return b;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:InputEvent.java
示例18: mousePressed
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
public void mousePressed(MouseEvent e) {
if (XToolkit.isLeftMouseButton(e)) {
Checkbox cb = (Checkbox) e.getSource();
if (cb.contains(e.getX(), e.getY())) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("mousePressed() on " + target.getName() + " : armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled());
}
if (!isEnabled()) {
// Disabled buttons ignore all input...
return;
}
if (!armed) {
armed = true;
}
pressed = true;
repaint();
}
}
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:22,代码来源:XCheckboxPeer.java
示例19: adjustListeningChildren
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
void adjustListeningChildren(long mask, int num) {
if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
mask == (AWTEvent.HIERARCHY_EVENT_MASK |
AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
if (!toAssert) {
eventLog.fine("Assertion failed");
}
}
if (num == 0)
return;
if ((mask & AWTEvent.HIERARCHY_EVENT_MASK) != 0) {
listeningChildren += num;
}
if ((mask & AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) != 0) {
listeningBoundsChildren += num;
}
adjustListeningChildrenOnParent(mask, num);
}
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:24,代码来源:Container.java
示例20: mixOnValidating
import sun.util.logging.PlatformLogger; //导入依赖的package包/类
@Override
void mixOnValidating() {
synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
}
if (hasHeavyweightDescendants()) {
recursiveApplyCurrentShape();
}
if (isLightweight() && isNonOpaqueForMixing()) {
subtractAndApplyShapeBelowMe();
}
super.mixOnValidating();
}
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:Container.java
注:本文中的sun.util.logging.PlatformLogger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论