org.eclipse.swt.SWT.getPlatform()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(134)

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

SWT.getPlatform介绍

[英]Returns the SWT platform name. Examples: "win32", "motif", "gtk", "photon", "carbon", "cocoa", "wpf"
[中]返回SWT平台名称。示例:“win32”、“motif”、“gtk”、“光子”、“碳”、“可可”、“wpf”

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public static final boolean isMac() {
 final String ws = SWT.getPlatform();
 return WS_CARBON.equals( ws ) || WS_COCOA.equals( ws );
}

代码示例来源:origin: pentaho/pentaho-kettle

public static final boolean isWindows() {
 final String ws = SWT.getPlatform();
 return WS_WIN32.equals( ws ) || WS_WPF.equals( ws );
}

代码示例来源:origin: pentaho/pentaho-kettle

if ( item.getParentItem() != null && item.getParentItem().equals( wTreeScriptsItem ) ) {
 if ( item != null && item == lastItem[0] ) {
  boolean isCarbon = SWT.getPlatform().equals( "carbon" );
  final Composite composite = new Composite( wTree, SWT.NONE );
  if ( !isCarbon ) {

代码示例来源:origin: pentaho/pentaho-kettle

if ( item.getParentItem() != null && item.getParentItem().equals( wTreeClassesItem ) ) {
 if ( item != null && item == lastItem[0] ) {
  boolean isCarbon = SWT.getPlatform().equals( "carbon" );
  final Composite composite = new Composite( wTree, SWT.NONE );
  if ( !isCarbon ) {

代码示例来源:origin: pentaho/pentaho-kettle

if ( item.getParentItem() != null && item.getParentItem().equals( wTreeScriptsItem ) ) {
 if ( item != null && item == lastItem[0] ) {
  boolean isCarbon = SWT.getPlatform().equals( "carbon" );
  final Composite composite = new Composite( wTree, SWT.NONE );
  if ( !isCarbon ) {

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

/**
 * Common WS query helper method.
 * @return the SWT windowing platform string.
 * @see SWT#getPlatform()
 * @since 3.5
 */
public static final String getWS() {
  return SWT.getPlatform();
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * Common WS query helper method. 
 * @return the SWT windowing platform string.
 * @see SWT#getPlatform()
 * @since 1.3
 */
public static final String getWS() {
  return SWT.getPlatform();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

/**
 * Returns the name of a valid font for the resident platform.
 */
static String getPlatformFont() {
  if(SWT.getPlatform() == "win32") {
    return "Arial";
  } else if (SWT.getPlatform() == "gtk") {
    return "Baekmuk Batang";
  } else {
    return "Verdana";
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return the SWT windowing platform string.
 * @see SWT#getPlatform()
 * @since 3.5
 */
public static String getWS() {
  return SWT.getPlatform();
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * Common WS query helper method. 
 * @return <code>true</code> for the cocoa platform.
 * @since 1.3
 */
public static final boolean isCocoa() {
  final String ws = SWT.getPlatform();
  return WS_COCOA.equals(ws);
}

代码示例来源:origin: org.eclipse.e4.ui/bindings

/**
 * Common WS query helper method.
 * 
 * @return <code>true</code> for motif platforms
 * @since 3.5
 */
public static final boolean isMotif() {
  final String ws = SWT.getPlatform();
  return WS_MOTIF.equals(ws);
}

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

public TabFolderDrawData() {
  state = new int[1];
  if (SWT.getPlatform().equals("gtk")) {
    spacing = -2;
  }
}

代码示例来源:origin: openaudible/openaudible

/**
 * Return TRUE if the platform is Windows
 *
 * @return boolean TRUE if platform is Windows
 */
public static boolean isWindows() {
  return (SWT.getPlatform().equalsIgnoreCase("win32"));
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return <code>true</code> for gtk platforms
 * @since 3.5
 */
public static boolean isGtk() {
  final String ws = SWT.getPlatform();
  return WS_GTK.equals(ws);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return <code>true</code> for the cocoa platform.
 * @since 3.5
 */
public static boolean isCocoa() {
  final String ws = SWT.getPlatform();
  return WS_COCOA.equals(ws);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return <code>true</code> for win32
 * @since 3.5
 */
public static boolean isWin32() {
  final String ws = SWT.getPlatform();
  return WS_WIN32.equals(ws);
}

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

/**
 * Common WS query helper method.
 * @return <code>true</code> for carbon platforms
 * @since 3.5
 */
public static final boolean isCarbon() {
  final String ws = SWT.getPlatform();
  return WS_CARBON.equals(ws);
}

代码示例来源:origin: org.eclipse.e4.ui/bindings

/**
 * Common WS query helper method.
 * 
 * @return <code>true</code> for windows platforms
 * @since 3.5
 */
public static final boolean isWindows() {
  final String ws = SWT.getPlatform();
  return WS_WIN32.equals(ws) || WS_WPF.equals(ws);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return <code>true</code> for mac platforms
 * @since 3.5
 */
public static boolean isMac() {
  final String ws = SWT.getPlatform();
  return WS_CARBON.equals(ws) || WS_COCOA.equals(ws);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Common WS query helper method.
 * @return <code>true</code> for motif platforms
 * @since 3.5
 */
@Deprecated
public static boolean isMotif() {
  final String ws = SWT.getPlatform();
  return WS_MOTIF.equals(ws);
}

相关文章