org.eclipse.swt.widgets.DateTime.getDisplay()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(239)

本文整理了Java中org.eclipse.swt.widgets.DateTime.getDisplay()方法的一些代码示例,展示了DateTime.getDisplay()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.getDisplay()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.DateTime
类名称:DateTime
方法名:getDisplay

DateTime.getDisplay介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void onDispose (Event event) {
  if (popupShell != null && !popupShell.isDisposed ()) {
    popupCalendar.removeListener (SWT.Dispose, popupListener);
    popupShell.dispose ();
  }
  Shell shell = getShell ();
  shell.removeListener (SWT.Deactivate, popupListener);
  Display display = getDisplay ();
  display.removeFilter (SWT.FocusIn, popupFilter);
  popupShell = null;
  popupCalendar = null;
  down = null;
  dateTimeString = null;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void onDispose (Event event) {
  if (popupShell != null && !popupShell.isDisposed ()) {
    popupCalendar.removeListener (SWT.Dispose, popupListener);
    popupShell.dispose ();
  }
  Shell shell = getShell ();
  shell.removeListener (SWT.Deactivate, popupListener);
  Display display = getDisplay ();
  display.removeFilter (SWT.FocusIn, popupFilter);
  popupShell = null;
  popupCalendar = null;
  down = null;
  dateTimeString = null;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void onDispose (Event event) {
  if (popupShell != null && !popupShell.isDisposed ()) {
    popupCalendar.removeListener (SWT.Dispose, popupListener);
    popupShell.dispose ();
  }
  Shell shell = getShell ();
  shell.removeListener (SWT.Deactivate, popupListener);
  Display display = getDisplay ();
  display.removeFilter (SWT.FocusIn, popupFilter);
  popupShell = null;
  popupCalendar = null;
  down = null;
  dateTimeString = null;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
  public void handleEvent (Event event) {
    if (event.widget == popupShell) {
      popupShellEvent (event);
      return;
    }
    if (event.widget == popupCalendar) {
      popupCalendarEvent (event);
      return;
    }
    if (event.widget == DateTime.this) {
      onDispose (event);
      return;
    }
    if (event.widget == getShell ()) {
      getDisplay ().asyncExec (new Runnable () {
        @Override
        public void run () {
          if (isDisposed ()) return;
          handleFocus (SWT.FocusOut);
        }
      });
    }
  }
};

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
  public void handleEvent (Event event) {
    if (event.widget == popupShell) {
      popupShellEvent (event);
      return;
    }
    if (event.widget == popupCalendar) {
      popupCalendarEvent (event);
      return;
    }
    if (event.widget == DateTime.this) {
      onDispose (event);
      return;
    }
    if (event.widget == getShell ()) {
      getDisplay ().asyncExec (new Runnable () {
        @Override
        public void run () {
          if (isDisposed ()) return;
          handleFocus (SWT.FocusOut);
        }
      });
    }
  }
};

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
  public void handleEvent (Event event) {
    if (event.widget == popupShell) {
      popupShellEvent (event);
      return;
    }
    if (event.widget == popupCalendar) {
      popupCalendarEvent (event);
      return;
    }
    if (event.widget == DateTime.this) {
      onDispose (event);
      return;
    }
    if (event.widget == getShell ()) {
      getDisplay ().asyncExec (new Runnable () {
        @Override
        public void run () {
          if (isDisposed ()) return;
          handleFocus (SWT.FocusOut);
        }
      });
    }
  }
};

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void popupShellEvent (Event event) {
  switch (event.type) {
    case SWT.Paint:
      /* Draw black rectangle around popupCalendar */
      Rectangle bounds = popupCalendar.getBounds ();
      Color black = getDisplay ().getSystemColor (SWT.COLOR_BLACK);
      event.gc.setForeground (black);
      event.gc.drawRectangle (0, 0, bounds.width + 1, bounds.height + 1);
      break;
    case SWT.Close:
      event.doit = false;
      dropDownCalendar (false);
      break;
    case SWT.MouseUp:
      dropDownCalendar (false);
      break;
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void popupShellEvent (Event event) {
  switch (event.type) {
    case SWT.Paint:
      /* Draw black rectangle around popupCalendar */
      Rectangle bounds = popupCalendar.getBounds ();
      Color black = getDisplay ().getSystemColor (SWT.COLOR_BLACK);
      event.gc.setForeground (black);
      event.gc.drawRectangle (0, 0, bounds.width + 1, bounds.height + 1);
      break;
    case SWT.Close:
      event.doit = false;
      dropDownCalendar (false);
      break;
    case SWT.MouseUp:
      dropDownCalendar (false);
      break;
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void popupShellEvent (Event event) {
  switch (event.type) {
    case SWT.Paint:
      /* Draw black rectangle around popupCalendar */
      Rectangle bounds = popupCalendar.getBounds ();
      Color black = getDisplay ().getSystemColor (SWT.COLOR_BLACK);
      event.gc.setForeground (black);
      event.gc.drawRectangle (0, 0, bounds.width + 1, bounds.height + 1);
      break;
    case SWT.Close:
      event.doit = false;
      dropDownCalendar (false);
      break;
    case SWT.MouseUp:
      dropDownCalendar (false);
      break;
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

shell.removeListener (SWT.Deactivate, popupListener);
shell.addListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.addFilter (SWT.FocusIn, popupFilter);
Control focusControl = getDisplay ().getFocusControl ();
if (focusControl == down || focusControl == popupCalendar ) return;
hasFocus = false;
Shell shell = getShell ();
shell.removeListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.removeFilter (SWT.MouseDown, mouseEventListener);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

shell.removeListener (SWT.Deactivate, popupListener);
shell.addListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.addFilter (SWT.FocusIn, popupFilter);
Control focusControl = getDisplay ().getFocusControl ();
if (focusControl == down || focusControl == popupCalendar ) return;
hasFocus = false;
Shell shell = getShell ();
shell.removeListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.removeFilter (SWT.MouseDown, mouseEventListener);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

shell.removeListener (SWT.Deactivate, popupListener);
shell.addListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.addFilter (SWT.FocusIn, popupFilter);
Control focusControl = getDisplay ().getFocusControl ();
if (focusControl == down || focusControl == popupCalendar ) return;
hasFocus = false;
Shell shell = getShell ();
shell.removeListener (SWT.Deactivate, popupListener);
Display display = getDisplay ();
display.removeFilter (SWT.FocusIn, popupFilter);
display.removeFilter (SWT.MouseDown, mouseEventListener);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

focusDayOnPopupCalendar ();
Display display = getDisplay ();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

focusDayOnPopupCalendar ();
Display display = getDisplay ();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

focusDayOnPopupCalendar ();
Display display = getDisplay ();

相关文章

DateTime类方法