Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCRTGraph for Java
 Meter Resizing

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
RunnerGirl Posted - 26 Mar 2007 : 14:05:12
I have created five meters and added them the the ChartView with three in one row and two in the second row. When I manually resize the panel to be much wider than tall, the meters overlap. Is there a way to avoid this?

Thanks
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 26 Mar 2007 : 14:51:46
Meters will always stay round, and will not change aspect ratio (i.e. become elliptical) regardless of what you do to the parent window. The radius of a meter is defined by its width. So if you start reducing the height of the parent window, the height of the meter will start to use a greater and greater percentage of the parent ChartView window. That is what would cause an overlap.

If you are going to use objects that require a fixed aspect ratio, i.e. round things like meters, you are going to have to restrict the resize capability of the parent window to a fixed aspect ratio, and only allow resizing to a fixed ratio of height:width. This is very common with image files, since changing the aspect ratio of a bitmap image file is often undesirable. The best place to do this would be to control the size of the JPanel object the ChartView is placed in.

Or you could use indicator objects (bars) that do not require a fixed aspect ratio. Keep in mind that drastically changing the aspect ratio of any graph will generally render the chart so ugly as to be useless.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07