ilog.cpl.table
Class IlpBasicTableUI.IlpMouseInputHandler

java.lang.Object
  extended by javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
      extended by ilog.cpl.table.IlpBasicTableUI.IlpMouseInputHandler
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener
Enclosing class:
IlpBasicTableUI

public class IlpBasicTableUI.IlpMouseInputHandler
extends BasicTableUI.MouseInputHandler

This class should be treated as a protected inner class. Instantiate it only within subclasses of BasicTableUI. This class is redefined to allow selection across the IlpJTable used to display fixed columns and the IlpJTable used to display free columns. The mouse events are forwarded to the right IlpJTable according to the mouse location within the IlpTableView.


Field Summary
protected  JTable targetTable
          The IlpJTable where the drag event occurred (table for fixed columns or table for free columns).
 
Constructor Summary
IlpBasicTableUI.IlpMouseInputHandler()
           
 
Method Summary
 void mouseDragged(MouseEvent e)
          Defines the behavior of the IlpTableView when the mouse is dragged over the contained IlpJTable.
 void mousePressed(MouseEvent e)
          Checks whether the event has to be managed, sets the adjusting flag on the selectionModel used by the IlpTableView and initializes the IlpJTable which is the "target" of the event.
 void mouseReleased(MouseEvent e)
          Checks whether the event has to be managed, clears the adjusting flag on the selectionModel used by the IlpTableView, and restores the original IlpJTable.
protected  void normalMouseDragged(MouseEvent e)
          Does the same as super.mouseDragged but uses targetTable instead of table.
protected  void setValueIsAdjusting(boolean flag)
          Sets the adjusting value for the selection model of the IlpTableView.
protected  boolean shouldIgnore(MouseEvent e)
          Returns true if the IlpTableView has to manage the given event.
 
Methods inherited from class javax.swing.plaf.basic.BasicTableUI.MouseInputHandler
mouseClicked, mouseEntered, mouseExited, mouseMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetTable

protected JTable targetTable
The IlpJTable where the drag event occurred (table for fixed columns or table for free columns).

Constructor Detail

IlpBasicTableUI.IlpMouseInputHandler

public IlpBasicTableUI.IlpMouseInputHandler()
Method Detail

mousePressed

public void mousePressed(MouseEvent e)
Checks whether the event has to be managed, sets the adjusting flag on the selectionModel used by the IlpTableView and initializes the IlpJTable which is the "target" of the event. At the beginning, the target table is the table.

Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class BasicTableUI.MouseInputHandler
Parameters:
e - The event to manage.

mouseDragged

public void mouseDragged(MouseEvent e)
Defines the behavior of the IlpTableView when the mouse is dragged over the contained IlpJTable.

Specified by:
mouseDragged in interface MouseMotionListener
Overrides:
mouseDragged in class BasicTableUI.MouseInputHandler
Parameters:
e - The event to manage.

normalMouseDragged

protected void normalMouseDragged(MouseEvent e)
Does the same as super.mouseDragged but uses targetTable instead of table.


mouseReleased

public void mouseReleased(MouseEvent e)
Checks whether the event has to be managed, clears the adjusting flag on the selectionModel used by the IlpTableView, and restores the original IlpJTable.

Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class BasicTableUI.MouseInputHandler
Parameters:
e - The event to manage.

shouldIgnore

protected boolean shouldIgnore(MouseEvent e)
Returns true if the IlpTableView has to manage the given event.

Parameters:
e - The event to check.
Returns:
whether an event has to be managed by the IlpTableView.

setValueIsAdjusting

protected void setValueIsAdjusting(boolean flag)
Sets the adjusting value for the selection model of the IlpTableView.

Parameters:
flag - Specifies whether the UI adjusts the selection.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.