/** * Notified when an overlay has been removed from the graph. This * implementation removes the given overlay from its parent if it is a * component inside a component hierarchy. */ protected void updateCellOverlayComponent(mxCellState state, mxICellOverlay overlay) { if (overlay instanceof Component) { Component comp = (Component) overlay; if (comp.getParent() == null) { getGraphControl().add(comp, 0); } mxRectangle rect = overlay.getBounds(state); if (rect != null) { comp.setBounds(rect.getRectangle()); comp.setVisible(true); } else { comp.setVisible(false); } } }
/** * Notified when an overlay has been removed from the graph. This * implementation removes the given overlay from its parent if it is a * component inside a component hierarchy. */ protected void updateCellOverlayComponent(mxCellState state, mxICellOverlay overlay) { if (overlay instanceof Component) { Component comp = (Component) overlay; if (comp.getParent() == null) { getGraphControl().add(comp, 0); } mxRectangle rect = overlay.getBounds(state); if (rect != null) { comp.setBounds(rect.getRectangle()); comp.setVisible(true); } else { comp.setVisible(false); } } }
/** * Starts handling a gesture at the given handle index. */ public void start(MouseEvent e, int index) { this.index = index; first = e.getPoint(); preview = createPreview(); if (preview != null) { graphComponent.getGraphControl().add(preview, 0); } }
graphComponent.getGraphControl().add(scrollPane, 0);
graphComponent.getGraphControl().add(scrollPane, 0);
graphComponent.getGraphControl().add(handle, 0); handle.setVisible(true);
graphComponent.getGraphControl().add(handle, 0); handle.setVisible(true);
graphControl.add(panel);
graphControl.add(panel);
/** * Marks the markedState and fires a mxEvent.MARK event. */ public void mark() { if (markedState != null) { Rectangle bounds = markedState.getRectangle(); bounds.grow(3, 3); bounds.width += 1; bounds.height += 1; setBounds(bounds); if (getParent() == null) { setVisible(true); if (KEEP_ON_TOP) { graphComponent.getGraphControl().add(this, 0); } else { graphComponent.getGraphControl().add(this); } } repaint(); eventSource.fireEvent(new mxEventObject(mxEvent.MARK, "state", markedState)); } }
/** * Marks the markedState and fires a mxEvent.MARK event. */ public void mark() { if (markedState != null) { Rectangle bounds = markedState.getRectangle(); bounds.grow(3, 3); bounds.width += 1; bounds.height += 1; setBounds(bounds); if (getParent() == null) { setVisible(true); if (KEEP_ON_TOP) { graphComponent.getGraphControl().add(this, 0); } else { graphComponent.getGraphControl().add(this); } } repaint(); eventSource.fireEvent(new mxEventObject(mxEvent.MARK, "state", markedState)); } }
/** * Starts handling a gesture at the given handle index. */ public void start(MouseEvent e, int index) { this.index = index; first = e.getPoint(); preview = createPreview(); if (preview != null) { graphComponent.getGraphControl().add(preview, 0); } }
/** * */ public void insertComponent(mxCellState state, Component c) { getGraphControl().add(c, 0); }
/** * */ public void insertComponent(mxCellState state, Component c) { getGraphControl().add(c, 0); }