Java Translucent Selection Box -


For custom rendering, I have created a square that extends the JPNL and overrides the color commandant method. The component in custom paint renders several sizes objects organized in an array. What I want to add is the ability to drag and select 1 or more shapes. While dragging, I would like to show an exchanging rectangle which defines the selection area which is visible in Windows Explorer. Can it provide a starting point to complete?

Thanks

I have an interesting way to do this in the source code of the Geoffrey Chart saw . You can draw a marquee on a section of the chart, and when you release the mouse, zoom in on the selected chart. Re-rendering of charts is expensive and unfortunately, Jeffrecht does not support partial paints of a chart. So to attract Marquee, they do bitwise operation of some type of component colors in a reversible fashion, every time when the mouse moves while selecting a circle, then you reverse the last bitwire operation on the old coordinate , Then redo it on the new coordinate.

ChartPanel in Geoffrey Chart. Take a look at Java.

  Private Wide Drozoomrectengel (Graphics 2DG2) {// Set XOR Mode Zoom Rectangle G2 .SetaxorModa (Color gray); If (this.zoomRectangle! = Null) {if (this.fillZoomRectangle) {g2.fill (this.zoomRectangle); } Other {g2.draw (this.zoomRectangle); }} // Reset default to 'overwrite' mode g2.setPaintMode (); }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -