Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Freeze and Unfreeze column(Freeze and Unfreeze column)
Freeze and Unfreeze column [message #1559902] Mon, 12 January 2015 09:14 Go to next message
ambuj bhargava is currently offline ambuj bhargavaFriend
Messages: 19
Registered: July 2014
Junior Member
Hi

I have gone through the sample code of NatTable.
My question is when we apply Freeze on the column, is the OOTB behaviour that the column to the left of freezed column will not be seen unless the unfreeze is again done.

Regards
Ambuj
Re: Freeze and Unfreeze column [message #1559922 is a reply to message #1559902] Mon, 12 January 2015 09:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I don't understand the question? OOTB?
Re: Freeze and Unfreeze column [message #1559976 is a reply to message #1559922] Mon, 12 January 2015 10:07 Go to previous messageGo to next message
ambuj bhargava is currently offline ambuj bhargavaFriend
Messages: 19
Registered: July 2014
Junior Member
I mean is that the default behaviour ?
Re: Freeze and Unfreeze column [message #1560008 is a reply to message #1559976] Mon, 12 January 2015 10:34 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
I'm still not sure about the concrete question. But the described behavior only occurs in case you are trying to freeze a column position that results in a freeze region that is wider than the available viewport width. Otherwise a user will not be able to interact with the table in a frozen state.
Re: Freeze and Unfreeze column [message #1560322 is a reply to message #1560008] Mon, 12 January 2015 14:33 Go to previous messageGo to next message
ambuj bhargava is currently offline ambuj bhargavaFriend
Messages: 19
Registered: July 2014
Junior Member
Thnaks for the prompt reply.

My question is:

In the sample examples the freeze and the unfreeze action is called using ctrl+shift+f and ctrl+shift +u respectively.
I have tried to put this on the Menu also that we get by mouse right click on the column.BUT it does not work properly.

The action that is being called on that is:public static <T> IMenuItemProvider withFreezeColumnItemProvider(
final EventList<?> eventList, final IDataProvider bodyDataProvider,
final Composite parent) {
return new IMenuItemProvider() {
@Override
public void addMenuItem(final NatTable natTable,
final Menu popUpMenu) {
freezeMenuItem = new MenuItem(popUpMenu, SWT.NONE);
freezeMenuItem.setText("Freeze Columns\tCtrl+Shift+F");
// freezeMenuItem.setAccelerator(accelerator);

freezeMenuItem.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event arg0) {

NatEventData obj = (NatEventData) popUpMenu.getData();
final int colIndex = natTable.getColumnIndexByPosition(obj .getColumnPosition());
natTable.doCommand(new FreezeColumnCommand(natTable
.getLayer(), colIndex));
freezeMenuItem.setEnabled(false);
}
});
}
};


When it freezes the columns there is issue with the alignment
but at the same time when ctrl+shift+f/u is being called it works correctly.

Basically the columns that get freezes comes but the horizontal scroll bar disappears,


Regards
Ambuj

[Updated on: Mon, 12 January 2015 14:35]

Report message to a moderator

Re: Freeze and Unfreeze column [message #1560335 is a reply to message #1560322] Mon, 12 January 2015 14:42 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
AFAIK the UI binding triggers the FreezePositionCommand. Also I'm not sure if the index position transformation is necessary as the command gets fired from the top, which leads to automatic transformation.
Previous Topic:NatTable in Eclipse editor
Next Topic:Putting multiple hyperlinks inside a cell
Goto Forum:
  


Current Time: Fri Apr 19 09:52:47 GMT 2024

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

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

Back to the top