Skip to main content



      Home
Home » Eclipse Projects » NatTable » Freeze and Unfreeze column(Freeze and Unfreeze column)
Freeze and Unfreeze column [message #1559902] Mon, 12 January 2015 04:14 Go to next message
Eclipse UserFriend
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 04:27 Go to previous messageGo to next message
Eclipse UserFriend
I don't understand the question? OOTB?
Re: Freeze and Unfreeze column [message #1559976 is a reply to message #1559922] Mon, 12 January 2015 05:07 Go to previous messageGo to next message
Eclipse UserFriend
I mean is that the default behaviour ?
Re: Freeze and Unfreeze column [message #1560008 is a reply to message #1559976] Mon, 12 January 2015 05:34 Go to previous messageGo to next message
Eclipse UserFriend
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 09:33 Go to previous messageGo to next message
Eclipse UserFriend
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 09:35] by Moderator

Re: Freeze and Unfreeze column [message #1560335 is a reply to message #1560322] Mon, 12 January 2015 09:42 Go to previous message
Eclipse UserFriend
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: Mon Jul 28 17:40:51 EDT 2025

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

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

Back to the top