Tabnine Logo
ColumnControlButton.canControl
Code IndexAdd Tabnine to your IDE (free)

How to use
canControl
method
in
org.jdesktop.swingx.table.ColumnControlButton

Best Java code snippets using org.jdesktop.swingx.table.ColumnControlButton.canControl (Showing top 15 results out of 315)

origin: org.codehaus.jtstand/jtstand-desktop

/** 
 * @inheritDoc
 * 
 */
public void addAdditionalActionItems(List<? extends Action> actions) {
  if (actions.size() == 0)
    return;
  // JW: this is a reference to the enclosing class 
  // prevents to make this implementation static
  // Hmmm...any way around?
  if (canControl()) {
    addSeparator();
  }
  addItems(actions);
}
 
origin: com.haulmont.thirdparty/swingx-core

/**
 * Populates the popup from scratch.
 * 
 * If applicable, creates and adds column visibility actions. Always adds
 * additional actions.
 */
protected void populatePopup() {
  clearAll();
  if (canControl()) {
    createVisibilityActions();
    addVisibilityActionItems();
  }
  addAdditionalActionItems();
}
origin: org.swinglabs.swingx/swingx-core

/** 
 * @inheritDoc
 * 
 */
@Override
public void addAdditionalActionItems(List<? extends Action> actions) {
  if (actions.size() == 0)
    return;
  // JW: this is a reference to the enclosing class 
  // prevents to make this implementation static
  // Hmmm...any way around?
  if (canControl()) {
    addSeparator();
  }
  
  if (getGrouper() == null) {
    addItems(actions);
    return;
  }
  List<? extends List<? extends Action>> groups = grouper.group(actions);
  for (List<? extends Action> group : groups) {
    addItems(group);
    if (group != groups.get(groups.size()- 1))
      addSeparator();
    
  }
  
}
 
origin: org.swinglabs.swingx/swingx-all

/** 
 * @inheritDoc
 * 
 */
@Override
public void addAdditionalActionItems(List<? extends Action> actions) {
  if (actions.size() == 0)
    return;
  // JW: this is a reference to the enclosing class 
  // prevents to make this implementation static
  // Hmmm...any way around?
  if (canControl()) {
    addSeparator();
  }
  
  if (getGrouper() == null) {
    addItems(actions);
    return;
  }
  List<? extends List<? extends Action>> groups = grouper.group(actions);
  for (List<? extends Action> group : groups) {
    addItems(group);
    if (group != groups.get(groups.size()- 1))
      addSeparator();
    
  }
  
}
 
origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/** 
 * @inheritDoc
 * 
 */
@Override
public void addAdditionalActionItems(List<? extends Action> actions) {
  if (actions.size() == 0)
    return;
  // JW: this is a reference to the enclosing class 
  // prevents to make this implementation static
  // Hmmm...any way around?
  if (canControl()) {
    addSeparator();
  }
  
  if (getGrouper() == null) {
    addItems(actions);
    return;
  }
  List<? extends List<? extends Action>> groups = grouper.group(actions);
  for (List<? extends Action> group : groups) {
    addItems(group);
    if (group != groups.get(groups.size()- 1))
      addSeparator();
    
  }
  
}
 
origin: com.haulmont.thirdparty/swingx-core

/** 
 * @inheritDoc
 * 
 */
@Override
public void addAdditionalActionItems(List<? extends Action> actions) {
  if (actions.size() == 0)
    return;
  // JW: this is a reference to the enclosing class 
  // prevents to make this implementation static
  // Hmmm...any way around?
  if (canControl()) {
    addSeparator();
  }
  
  if (getGrouper() == null) {
    addItems(actions);
    return;
  }
  List<? extends List<? extends Action>> groups = grouper.group(actions);
  for (List<? extends Action> group : groups) {
    addItems(group);
    if (group != groups.get(groups.size()- 1))
      addSeparator();
    
  }
  
}
 
origin: org.swinglabs.swingx/swingx-core

/**
 * Populates the popup from scratch.
 * 
 * If applicable, creates and adds column visibility actions. Always adds
 * additional actions.
 */
protected void populatePopup() {
  clearAll();
  if (canControl()) {
    createVisibilityActions();
    addVisibilityActionItems();
  }
  addAdditionalActionItems();
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Populates the popup from scratch.
 * 
 * If applicable, creates and adds column visibility actions. Always adds
 * additional actions.
 */
protected void populatePopup() {
  clearAll();
  if (canControl()) {
    createVisibilityActions();
    addVisibilityActionItems();
  }
  addAdditionalActionItems();
}
origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Populates the popup from scratch.
 * 
 * If applicable, creates and adds column visibility actions. Always adds
 * additional actions.
 */
protected void populatePopup() {
  clearAll();
  if (canControl()) {
    createVisibilityActions();
    addVisibilityActionItems();
  }
  addAdditionalActionItems();
}
origin: org.codehaus.jtstand/jtstand-desktop

/**
 * Populates the popup from scratch.
 * 
 * If applicable, creates and adds column visibility actions. Always adds
 * additional actions.
 */
protected void populatePopup() {
  clearAll();
  if (canControl()) {
    createVisibilityActions();
    addVisibilityActionItems();
  }
  addAdditionalActionItems();
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Adjusts internal state after table's column model property has changed.
 * Handles cleanup of listeners to the old/new columnModel (Note, that
 * it listens to the column model only if it can control column visibility).
 * Updates content of popup.
 * 
 * @param oldModel the old <code>TableColumnModel</code> we had been listening to.
 */
protected void updateFromColumnModelChange(TableColumnModel oldModel) {
  if (oldModel != null) {
    oldModel.removeColumnModelListener(columnModelListener);
  }
  populatePopup();
  if (canControl()) {
    table.getColumnModel().addColumnModelListener(getColumnModelListener());
  }
}
 
origin: org.swinglabs.swingx/swingx-core

/**
 * Adjusts internal state after table's column model property has changed.
 * Handles cleanup of listeners to the old/new columnModel (Note, that
 * it listens to the column model only if it can control column visibility).
 * Updates content of popup.
 * 
 * @param oldModel the old <code>TableColumnModel</code> we had been listening to.
 */
protected void updateFromColumnModelChange(TableColumnModel oldModel) {
  if (oldModel != null) {
    oldModel.removeColumnModelListener(columnModelListener);
  }
  populatePopup();
  if (canControl()) {
    table.getColumnModel().addColumnModelListener(getColumnModelListener());
  }
}
 
origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Adjusts internal state after table's column model property has changed.
 * Handles cleanup of listeners to the old/new columnModel (Note, that
 * it listens to the column model only if it can control column visibility).
 * Updates content of popup.
 * 
 * @param oldModel the old <code>TableColumnModel</code> we had been listening to.
 */
protected void updateFromColumnModelChange(TableColumnModel oldModel) {
  if (oldModel != null) {
    oldModel.removeColumnModelListener(columnModelListener);
  }
  populatePopup();
  if (canControl()) {
    table.getColumnModel().addColumnModelListener(getColumnModelListener());
  }
}
 
origin: org.codehaus.jtstand/jtstand-desktop

/**
 * Adjusts internal state after table's column model property has changed.
 * Handles cleanup of listeners to the old/new columnModel (Note, that
 * it listens to the column model only if it can control column visibility).
 * Updates content of popup.
 * 
 * @param oldModel the old <code>TableColumnModel</code> we had been listening to.
 */
protected void updateFromColumnModelChange(TableColumnModel oldModel) {
  if (oldModel != null) {
    oldModel.removeColumnModelListener(columnModelListener);
  }
  populatePopup();
  if (canControl()) {
    table.getColumnModel().addColumnModelListener(getColumnModelListener());
  }
}
 
origin: com.haulmont.thirdparty/swingx-core

/**
 * Adjusts internal state after table's column model property has changed.
 * Handles cleanup of listeners to the old/new columnModel (Note, that
 * it listens to the column model only if it can control column visibility).
 * Updates content of popup.
 * 
 * @param oldModel the old <code>TableColumnModel</code> we had been listening to.
 */
protected void updateFromColumnModelChange(TableColumnModel oldModel) {
  if (oldModel != null) {
    oldModel.removeColumnModelListener(columnModelListener);
  }
  populatePopup();
  if (canControl()) {
    table.getColumnModel().addColumnModelListener(getColumnModelListener());
  }
}
 
org.jdesktop.swingx.tableColumnControlButtoncanControl

Javadoc

Method to check if we can control column visibility POST: if true we can be sure to have an extended TableColumnModel

Popular methods of ColumnControlButton

  • populatePopup
    Populates the popup from scratch. If applicable, creates and adds column visibility actions. Always
  • <init>
    Creates a column control button for the table. The button uses the given icon and has no text.
  • createVisibilityActions
    Creates and adds a ColumnVisiblityAction for every column that should be togglable via the column co
  • getAdditionalActions
    creates and returns a list of additional Actions to add to the popup. Here: the actions are looked u
  • togglePopup
    Toggles the popup component's visibility. This method is called by this control's default action. H
  • addAdditionalActionItems
    Adds additional actions to the popup, if additionalActionsVisible is true, does nothing otherwise. H
  • addVisibilityActionItems
    Adds visibility actions into the popup view. Here: delegates the list of actions to the DefaultColum
  • clearAll
    removes all components from the popup, making sure to release all columnVisibility actions.
  • clearColumnVisibilityActions
    Releases actions and clears list of actions.
  • createColumnControlPopup
    Factory method to return a ColumnControlPopup. Subclasses can override to hook custom implementation
  • createColumnModelListener
    Creates the listener to columnModel. Subclasses are free to roll their own. Implementation note: th
  • createColumnVisibilityAction
    Creates and returns a ColumnVisibilityAction for the givenTableColumn. The return value might be nul
  • createColumnModelListener,
  • createColumnVisibilityAction,
  • createControlAction,
  • createTablePropertyChangeListener,
  • getAction,
  • getColumnControlActionKeys,
  • getColumnControlPopup,
  • getColumnModelListener,
  • getColumnVisibilityActions

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Join (org.hibernate.mapping)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now