Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Information on TextSizeRecalculation process(Event needed after TextSizeRecalculation on TableViewerColumn )
Information on TextSizeRecalculation process [message #1690167] Wed, 25 March 2015 14:31 Go to next message
laurent russo is currently offline laurent russoFriend
Messages: 3
Registered: July 2014
Junior Member
In our application the users have two ways to customize TableViewerColumn's width :
1/ The first one is to manually specify each column width by dragging header's edge of columns.
2/ The second one is to select "autoFit" in a display subMenu, which will autosize all columns width by packing them.
The user's choices are persisted, allowing to restore the same environment across sessions.

Important Note:
When a user manually modifies the column width, "AutoFit" is automatically deActivated ( ColumnWidthChangeEvent)

All is fine until we encountered the following situation :

Regularly, when a user selects "AutoFit"
1/ We pack all columns ignoring at the same time all associated WidthChanges events from Columns.
2/ Then, an unHandled "TextSizeRecalculation.repack" occured ! Packing all columns a second time and we have no way to know if it is a user's action or not.


Is there a way to know/be informed when the TextSizeRecalculation phase is ending ?
Our current workaround, is to look for this information in the stacktrace, which is not really satisfying nor optimal.
Might the TextSizeUtil expose such a method, in the way of what is done with TextSizeUtil#isTemporaryResize() ?
Re: Information on TextSizeRecalculation process [message #1690282 is a reply to message #1690167] Thu, 26 March 2015 10:04 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
the internal flag TextSizeUtil#isTemporaryResize() marks the
text-size-determination (TSD) Shell enlargement (+1000px). Evaluating
this flag in Shell resize event will ensure that you are in the TSD
resizing. The next resize event will be triggered by TSD Shell restore
and probably you want to filter it (ignore column packing).
Another thing you could try is to clear the internal TableColumn
"packed" state by setting the column width manually again, like:
column.pack();
column.setWidth( column.getWidth() );
Thus, TSD will not repack the column again as it is considered as not
packed.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Margin and TitleAreaDialog
Next Topic:[ANN] RAP 3.0 M6 published
Goto Forum:
  


Current Time: Thu Apr 25 10:57:33 GMT 2024

Powered by FUDForum. Page generated in 0.02379 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top