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

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
daviddu@cctexas.com Posted - 07 Mar 2006 : 10:25:45
As long as I'm posing questions, one more I'm interested in.

Is there a way to display a numeric variable (RTNumericPanelMeter() ) in a fixed width field, with leading zeros or spaces?

David Dudley
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 07 Mar 2006 : 12:04:00
The software does support fixed width panel meter frames. That can be accomplished using the panelmeter setPanelMeterMinWidth method. You specify the minimum width in device (pixel) units.

The software does not support leading zeros in numeric displays.

Normally the software sets the justification of the panelmeter and the text inside based on the positioning constants, for example ChartObj.OUTSIDE_PLOTAREA_MIN for the RTNumericPanelMeter in the BarApplication1 example program. In that case the panel meter justification is set to JUSTIFY_CENTER for x, and JUSTIFY_MAX for y.

If you are willing to manually position the panel meters, using the ChartConstants.CUSTOM_POSITION positioning constant, you can set the justification to your own values. If you want to right justify the numeric values in the panel meter, you can use similar the following, based on the BarApplication1 example program.

			
RTNumericPanelMeter panelmeter = new RTNumericPanelMeter(pTransform1, panelmeterattrib);
// panelmeter.setPanelMeterPosition( ChartObj.OUTSIDE_PLOTAREA_MIN);

// NO AUTOMATIC POSITIONING
panelmeter.setPanelMeterPosition( ChartConstants.CUSTOM_POSITION);

panelmeter.getNumericTemplate().setTextBgMode ( true);
panelmeter.getNumericTemplate().setLineColor( Color.green);
panelmeter.getNumericTemplate().setTextFont( font24Numeric);
panelmeter.getNumericTemplate().setDecimalPos( 1);
	
// SET WIDTH OF PANEL METER
panelmeter.setPanelMeterMinWidth(100.0);
// SET POSITION OF PANEL METER IN NORM_GRAPH_POS COORDINATES
panelmeter.setLocation(0.75, 0.9, ChartConstants.NORM_GRAPH_POS );
// JUSTIFY PANEL METER WITH RESPECT TO RIGHT
panelmeter.getNumericTemplate().setXJust(ChartConstants.JUSTIFY_MAX);
// JUSTIFY PANEL METER WITH RESPECT TO BOTTOM
panelmeter.getNumericTemplate().setYJust(ChartConstants.JUSTIFY_MIN);


We don't recommend this however, since it is very difficult to position the panel meter properly for variable sized ChartView windows. Also, we have long found that the numeric panel meters, when positioned below a bar, look better centered, not left or right justified.

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