@ -157,7 +157,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
dragType = GridUtils . DRAG_CELL_SIZE ;
isDragPermited = true ;
dragIndex = index ;
showToolTip ( evt , createToolTipString ( sizeList . get ( dragIndex ) . toPixD ( resolution ) , sizeList . getRangeValue ( 0 , dragIndex + 1 ) . toPixD ( resolution ) ) ) ;
showToolTip ( evt , createToolTipString ( sizeList . get ( dragIndex ) , sizeList . getRangeValue ( 0 , dragIndex + 1 ) ) ) ;
return true ;
}
if ( between ( evt , tmpSize1 , tmpSize2 ) ) {
@ -301,21 +301,18 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
protected abstract void resetGridSelectionBySelect ( int index , ElementCasePane ePane ) ;
private String createToolTipString ( double doubleValue , double totalDouble Value) {
private String createToolTipString ( UNIT unitValue , UNIT totalUnit Value) {
int unitType = DesignerEnvManager . getEnvManager ( ) . getReportLengthUnit ( ) ;
// int resolution = ScreenResolution.getScreenResolution();
FU ulen = FU . valueOfPix ( ( int ) doubleValue , resolution ) ;
FU tulen = FU . valueOfPix ( ( int ) totalDoubleValue , resolution ) ;
ReportLengthUNITProvider lengthUNIT = DesignerUIModeConfig . getInstance ( ) . parseLengthUNIT ( unitType ) ;
String unit = lengthUNIT . unitText ( ) ;
double len = lengthUNIT . unit2Value4Scale ( ulen ) ;
double tlen = lengthUNIT . unit2Value4Scale ( tulen ) ;
double len = lengthUNIT . unit2Value4Scale ( unitValue ) ;
double tlen = lengthUNIT . unit2Value4Scale ( totalUnitValue ) ;
StringBuilder sb = new StringBuilder ( ) ;
sb . append ( String . format ( "%.2f" , new Double ( len ) ) )
. append ( '/' ) . append ( String . format ( "%.2f" , new Double ( tlen ) ) )
. append ( unit ) . append ( '(' )
. append ( ( int ) ( doubleValue ) ) . append ( '/' )
. append ( ( int ) ( totalDoubleValue ) )
. append ( ( int ) ( unitValue . toPixD ( resolution ) ) ) . append ( '/' )
. append ( ( int ) ( totalUnitValue . toPixD ( resolution ) ) )
. append ( com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Px" ) )
. append ( ')' ) ;
return sb . toString ( ) ;
@ -416,7 +413,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
DynamicUnitList sizeList = getSizeList ( report ) ;
// int resolution = ScreenResolution.getScreenResolution();
this . setToolTipText2 ( this . createToolTipString ( sizeList . get ( dragIndex ) . toPixD ( resolution ) , sizeList . getRangeValue ( 0 , dragIndex + 1 ) . toPixD ( resolution ) ) ) ;
this . setToolTipText2 ( this . createToolTipString ( sizeList . get ( dragIndex ) , sizeList . getRangeValue ( 0 , dragIndex + 1 ) ) ) ;
}
ePane . repaint ( ) ;