本文整理汇总了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);
}
}
示例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);
}
}
示例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));
}