@ -152,13 +152,11 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
private ScrollAction PRESS_ACTION = new ScrollAction ( ) {
@Override
public boolean run ( MouseEvent evt , int index , double tmpSize1 , double tmpSize2 , int tmpIncreaseSize , int oldEndValueSize , ElementCase report , DynamicUnitList sizeList ) {
// int resolution = ScreenResolution.getScreenResolution();
if ( isOnSeparatorLineIncludeZero ( evt , tmpSize2 , tmpIncreaseSize ) | | isOnNormalSeparatorLine ( evt , tmpSize2 ) ) {
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 ) ) {
@ -302,21 +300,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 = UnitConvertUtil . 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,8 +411,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
iterateScrollBar ( ePane , evt , DRAG_ACTION ) ;
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 ( ) ;