2

I am trying to build a Media Player. I have all the code for music playback. And the GUI is made up of 3 main parts:-

  1. A blue background.
  2. A JList with JScrollPane
  3. A JLayer Shell (with a polygon cut out to reveal the list and blue background beneath it.)

So my question is how can I create a custom list or JTable that is slightly rotated with the base of the component stretched out on both corners (using a perspective filter). Also the JScrollbar attached must be customized also. I guess at least it needs to be rotated. But would like to know how to make one by supplying my own graphics. Is this possible?

Here is a MOCKUP of the design: http://www.splashportal.net/MOCKUP/iJuk-MOCKUP.swf

Here is a Screenshot of it: enter image description here

aubreybourke
  • 439
  • 1
  • 5
  • 17
  • 1
    *"Here is a MOCKUP of the design: ...swf"* A picture paints a thousand words, but a SWF will not be downl-loaded here. Any chance of a small (WxH) screen-shot? – Andrew Thompson Aug 13 '12 at 11:35
  • 1
    sounds to me like this is way beyond what swing can do. The Windows Presentation Foundation has rotable and transformable controls, but swing is from another decade.. – Jonas Eicher Aug 13 '12 at 12:08

1 Answers1

2

You can transform a view component, as shown here, but mouse interaction is effectively impossible without re-writing the UI delegate. Alternatively, you may be able to adapt the approach shown here that uses an inverse transform to effect mouse control.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • hmm ... didn't do more than skim your references, but first thing that comes to my mind is decorating the ui with JLayer (jdk7) or JXLayer (jdk6). Faintly remember that there used to be a TransformUI/ZoomableUI (by Piet Blok) which leaves the components fully functional – kleopatra Aug 18 '12 at 14:01
  • Maybe [`TransformUtils`](http://code.google.com/p/link-collector/source/browse/ver2/trunk/labs/zoom-with-jxpanel-src/org/pbjar/jxlayer/demo/TransformUtils.java?r=436)? – trashgod Aug 18 '12 at 14:34
  • no, it was TranformUI (the decorating ui used by JXLayer) - the package was org.pbjar.jxlayer.plaf.ext. For some reasons, as @Madprogrammer detected a couple of days ago, the website is gone. It's used (copied) in a google project http://code.google.com/p/link-collector/source/browse/ver2/trunk/labs/zoom-with-jxpanel-src/org/pbjar/jxlayer/?r=436, so not entirely lost. Not aware of any adjustments to JLayer, though – kleopatra Aug 18 '12 at 15:27