private CellConnectorListener(int row, int col) { cell = new Coordinates(row, col); }
/** * {@inheritDoc} */ public String getIconImageURLForUserObject(Object userObject) { if (iconImageURLProvider != null) { return iconImageURLProvider.getIconImageURLForObject(userObject); } return null; }
public void run() { if (evt.getNewSelection() == null || evt.getNewSelection().length == 0) { selectionModel.clearSelection(); return; int[] modelIndices = evt.getNewSelection().clone(); viewIndices = new int[modelIndices.length]; for (int i = 0; i < modelIndices.length; i++) { viewIndices[i] = rowMapper.viewIndex(modelIndices[i]); viewIndices = evt.getNewSelection().clone();
/** * Tracks changes in model selections to forward to a selectable. * <p> * {@inheritDoc} */ public void valueChanged(ListSelectionEvent e) { ULCListSelectionModel sm = (ULCListSelectionModel) e.getSource(); int[] selectedIndices = getSelectedIndices(sm); int[] modelIndices; if (selectedIndices.length > 0) { if (rowMapper != null) { int[] viewIndices = selectedIndices; modelIndices = new int[viewIndices.length]; for (int i = 0; i < viewIndices.length; i++) { modelIndices[i] = rowMapper.modelIndex(viewIndices[i]); } } else { modelIndices = selectedIndices; } } else { modelIndices = selectedIndices; } viewSelectable.setSelectedIndices(modelIndices); } }
/** * Is client version compatible boolean. * * @param clientVersion * the client version * @return the boolean */ protected boolean isClientVersionCompatible(String clientVersion) { return Boolean.parseBoolean(System.getProperty("skipJspressoVersionCheck")) || Build.getJspressoVersion() == null || Build.UNKNOWN.equals(Build.getJspressoVersion()) || Build.getJspressoVersion().equals(clientVersion); }
if (evt.getNewSelection() == null || evt.getNewSelection().length == 0) { selectionModel.clearSelection(); return; int[] modelIndices = evt.getNewSelection().clone(); viewIndices = new int[modelIndices.length]; for (int i = 0; i < modelIndices.length; i++) { viewIndices[i] = rowMapper.viewIndex(modelIndices[i]); viewIndices = evt.getNewSelection().clone();
/** * Tracks changes in model selections to forward to a selectable. * <p> * {@inheritDoc} */ public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } SListSelectionModel sm = (SListSelectionModel) e.getSource(); int[] selectedIndices = getSelectedIndices(sm); int[] modelIndices; if (selectedIndices.length > 0) { if (rowMapper != null) { int[] viewIndices = selectedIndices; modelIndices = new int[viewIndices.length]; for (int i = 0; i < viewIndices.length; i++) { modelIndices[i] = rowMapper.modelIndex(viewIndices[i]); } } else { modelIndices = selectedIndices; } } else { modelIndices = selectedIndices; } viewSelectable.setSelectedIndices(modelIndices, sm .getLeadSelectionIndex()); } }
private CellConnectorListener(int row, int col) { cell = new Coordinates(row, col); }
/** * {@inheritDoc} */ public String getIconImageURLForObject(Object userObject) { if (delegateProvider != null && userObject instanceof BeanModule && ((BeanModule) userObject).getModuleObject() != null && ((BeanModule) userObject).getIconImageURL() == null) { return delegateProvider .getIconImageURLForObject(((BeanModule) userObject).getModuleObject()); } else if (userObject instanceof Module) { return ((Module) userObject).getIconImageURL(); } else if (userObject instanceof Workspace) { return ((Workspace) userObject).getIconImageURL(); } return null; }
/** * Handle version incompatibility list. * * @param startCommand * the start command * @param controller * the controller * @param locale * the locale * @return the list */ protected List<RemoteCommand> handleVersionIncompatibility(RemoteStartCommand startCommand, IFrontendController<RComponent, RIcon, RAction> controller, Locale locale) { RemoteMessageCommand errorMessage = createErrorMessageCommand(); assert controller != null; errorMessage.setMessage(controller.getTranslation( "incompatible.client.version", new Object[] { startCommand.getVersion(), Build.getJspressoVersion() }, locale)); // Do not return the singleton list directly since subclasses might add commands to it. return new ArrayList<>(Collections.singleton((RemoteCommand) errorMessage)); }
if (evt.getNewSelection() == null || evt.getNewSelection().length == 0) { selectionModel.clearSelection(); return; int[] modelIndices = evt.getNewSelection().clone(); viewIndices = new int[modelIndices.length]; for (int i = 0; i < modelIndices.length; i++) { viewIndices[i] = rowMapper.viewIndex(modelIndices[i]); viewIndices = evt.getNewSelection().clone();
/** * Tracks changes in model selections to forward to a selectable. * <p> * {@inheritDoc} */ public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } ListSelectionModel sm = (ListSelectionModel) e.getSource(); int[] selectedIndices = getSelectedIndices(sm); int[] modelIndices; if (selectedIndices.length > 0) { if (rowMapper != null) { int[] viewIndices = selectedIndices; modelIndices = new int[viewIndices.length]; for (int i = 0; i < viewIndices.length; i++) { modelIndices[i] = rowMapper.modelIndex(viewIndices[i]); } } else { modelIndices = selectedIndices; } } else { modelIndices = selectedIndices; } viewSelectable.setSelectedIndices(modelIndices, sm .getLeadSelectionIndex()); } }
private CellConnectorListener(int row, int col) { cell = new Coordinates(row, col); }
private CellConnectorListener getChildCellConnectorListener(int row, int col) { if (cachedCellListeners == null) { cachedCellListeners = new HashMap<Coordinates, CellConnectorListener>(); } CellConnectorListener cachedListener = cachedCellListeners .get(new Coordinates(row, col)); if (cachedListener == null) { cachedListener = new CellConnectorListener(row, col); cachedCellListeners.put(new Coordinates(row, col), cachedListener); } return cachedListener; }
private CellConnectorListener getChildCellConnectorListener(int row, int col) { if (cachedCellListeners == null) { cachedCellListeners = new HashMap<Coordinates, CellConnectorListener>(); } CellConnectorListener cachedListener = cachedCellListeners .get(new Coordinates(row, col)); if (cachedListener == null) { cachedListener = new CellConnectorListener(row, col); cachedCellListeners.put(new Coordinates(row, col), cachedListener); } return cachedListener; }
private CellConnectorListener getChildCellConnectorListener(int row, int col) { if (cachedCellListeners == null) { cachedCellListeners = new HashMap<Coordinates, CellConnectorListener>(); } CellConnectorListener cachedListener = cachedCellListeners .get(new Coordinates(row, col)); if (cachedListener == null) { cachedListener = new CellConnectorListener(row, col); cachedCellListeners.put(new Coordinates(row, col), cachedListener); } return cachedListener; }