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

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

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

DateTime.setFont介绍

暂无

代码示例

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

@Override
public void setFont (Font font) {
  super.setFont (font);
  this.font = font;
  if (popupCalendar != null) popupCalendar.setFont (font);
  redraw ();
}

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

@Override
public void setFont (Font font) {
  super.setFont (font);
  this.font = font;
  if (popupCalendar != null) popupCalendar.setFont (font);
  redraw ();
}

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

@Override
public void setFont (Font font) {
  super.setFont (font);
  this.font = font;
  if (popupCalendar != null) popupCalendar.setFont (font);
  redraw ();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

data= new GridData(SWT.FILL, SWT.FILL, true, false);
argumentsDate.setLayoutData(data);
argumentsDate.setFont(multiArgumentComposite.getFont());
argumentsDate.addSelectionListener(new SelectionAdapter() {
  @Override

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

void createPopupShell (int year, int month, int day) {
  popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
  if (font != null) popupCalendar.setFont (font);
  if (fg != null) popupCalendar.setForeground (fg);
  if (bg != null) popupCalendar.setBackground (bg);

  mouseEventListener = new Listener () {
    @Override
    public void handleEvent (Event event) {
      if (event.widget instanceof Control) {
        Control c = (Control)event.widget;
        if (c != down && c.getShell () != popupShell)
          dropDownCalendar (false);
      }
    }
  };

  int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
  for (int i=0; i < listeners.length; i++) {
    popupShell.addListener (listeners [i], popupListener);
  }
  listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i < listeners.length; i++) {
    popupCalendar.addListener (listeners [i], popupListener);
  }
  addListener (SWT.Dispose, popupListener);
  if (year != -1) popupCalendar.setDate (year, month, day);
}

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

void createPopupShell (int year, int month, int day) {
  popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
  if (font != null) popupCalendar.setFont (font);
  if (fg != null) popupCalendar.setForeground (fg);
  if (bg != null) popupCalendar.setBackground (bg);

  mouseEventListener = new Listener () {
    @Override
    public void handleEvent (Event event) {
      if (event.widget instanceof Control) {
        Control c = (Control)event.widget;
        if (c != down && c.getShell () != popupShell)
          dropDownCalendar (false);
      }
    }
  };

  int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
  for (int i=0; i < listeners.length; i++) {
    popupShell.addListener (listeners [i], popupListener);
  }
  listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i < listeners.length; i++) {
    popupCalendar.addListener (listeners [i], popupListener);
  }
  addListener (SWT.Dispose, popupListener);
  if (year != -1) popupCalendar.setDate (year, month, day);
}

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

void createPopupShell (int year, int month, int day) {
  popupShell = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
  if (font != null) popupCalendar.setFont (font);
  if (fg != null) popupCalendar.setForeground (fg);
  if (bg != null) popupCalendar.setBackground (bg);

  mouseEventListener = new Listener () {
    @Override
    public void handleEvent (Event event) {
      if (event.widget instanceof Control) {
        Control c = (Control)event.widget;
        if (c != down && c.getShell () != popupShell)
          dropDownCalendar (false);
      }
    }
  };

  int [] listeners = {SWT.Close, SWT.MouseUp, SWT.Paint};
  for (int i=0; i < listeners.length; i++) {
    popupShell.addListener (listeners [i], popupListener);
  }
  listeners = new int [] {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i < listeners.length; i++) {
    popupCalendar.addListener (listeners [i], popupListener);
  }
  addListener (SWT.Dispose, popupListener);
  if (year != -1) popupCalendar.setDate (year, month, day);
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

popupShell.window.setHasShadow(true);
popupCalendar = new DateTime (popupShell, SWT.CALENDAR);
if (font != null) popupCalendar.setFont (font);

相关文章

DateTime类方法