开发者

JTree view under High Contrast Mode

I have one issue related to JTree swing component, I want to use JTree under Windows high contrast Mode, but it never shows tree nodes according to windows High contrast t开发者_如何学运维heme.

Jtree view Under Normal Mode

JTree view under High Contrast Mode

Jtree view Under High Contrast Mode

JTree view under High Contrast Mode

Eclipse Package Explorer view Under Normal Mode

JTree view under High Contrast Mode

Eclipse Package Explorer view Under High Contrast Mode

JTree view under High Contrast Mode

I want to make my applications jtree view same as eclipse's "high contrast" view.

Can anybody guide on this?? I am trying to write a logic like:

// calling this On application load - or via some kind of listener

Toolkit toolkit = Toolkit.getDefaultToolkit(); 
Boolean highContrast = (Boolean)toolkit.getDesktopProperty( "win.highContrast.on" ); 
boolean flag=highContrast.booleanValue();
    if(flag){
    // do stuff for high contrast
    }
    else{
    // show in normal mode
    }

Thanks for your help!!


According to this issue is this bug in Swing L&F implementation. There is possible to accept this by modifying Windows L&F and provide it as own, or use different L&F which supports this.


I implemented this with the help of toolkit calls pscode.org/prop/form.html - get Changed font and font size details and apply to jtree

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜