当前位置: 首页>>代码示例>>Java>>正文


Java JVM类代码示例

本文整理汇总了Java中org.jdesktop.swingx.util.JVM的典型用法代码示例。如果您正苦于以下问题:Java JVM类的具体用法?Java JVM怎么用?Java JVM使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JVM类属于org.jdesktop.swingx.util包,在下文中一共展示了JVM类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: installRepaintManager

import org.jdesktop.swingx.util.JVM; //导入依赖的package包/类
void installRepaintManager() {
    if (!JVM.current().isOrLater(JVM.JDK1_7)) {
        RepaintManager manager = RepaintManager.currentManager(this);
        RepaintManager trm = SwingXUtilities.getTranslucentRepaintManager(manager);
        RepaintManager.setCurrentManager(trm);
    }
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:8,代码来源:JXPanel.java

示例2: testGetBaseLine

import org.jdesktop.swingx.util.JVM; //导入依赖的package包/类
@Test
  public void testGetBaseLine() {
  	int baseline = ui.getBaseline(textComponent, textComponent.getWidth(), textComponent.getHeight());
if(JVM.current().isOrLater(JVM.JDK1_6)){
  		assertNotSame(-2, baseline);
  	}else{
  		assertSame(-2, baseline);
  	}
  }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:10,代码来源:PromptTextUITest_Base.java

示例3: hackVistaHeaderBorder

import org.jdesktop.swingx.util.JVM; //导入依赖的package包/类
/**
 * Hack around the oversized vista header border installed by core.
 * Registers a (5,5,5,5) empty border for vista themes. Does nothing if the
 * OS is not Vista or the addon is classic windows or the JVM isn't 1.5. 
 * 
 * PENDING: can we have XP themes under vista? If so, this needs to be changed - 
 * most probably the xp border is okay.
 * 
 * @param addon
 * @param defaults
 */
private void hackVistaHeaderBorder(LookAndFeelAddons addon, DefaultsList defaults) {
    // do nothing if not vista or for classic design under vista
    if (!OS.isWindowsVista() || (addon instanceof WindowsClassicLookAndFeelAddons)
            || !JVM.current().isOneDotFive())
        return;
    defaults.add(ColumnHeaderRenderer.VISTA_BORDER_HACK,
            new BorderUIResource.EmptyBorderUIResource(5, 5, 5, 5));
}
 
开发者ID:sing-group,项目名称:aibench-project,代码行数:20,代码来源:ColumnHeaderRendererAddon.java


注:本文中的org.jdesktop.swingx.util.JVM类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。