public JXTransformer(JComponent view, AffineTransform at) { super(null); setTransform(at); super.addImpl(glassPane, null, 0); setView(view); Handler handler = new Handler(); addHierarchyBoundsListener(handler); addComponentListener(handler); }
/** * Sets the content pane of this JCollapsiblePane. Components must be added to this content pane, * not to the JCollapsiblePane. * * @param contentPanel * @throws IllegalArgumentException if contentPanel is null */ public void setContentPane(Container contentPanel) { if (contentPanel == null) { throw new IllegalArgumentException("Content pane can't be null"); } if (wrapper != null) { super.remove(wrapper); } wrapper = new WrapperContainer(contentPanel); super.addImpl(wrapper, BorderLayout.CENTER, -1); }
public void setView(Component view) { if (getView() != null) { super.remove(getView()); } if (view != null) { super.addImpl(view, null, 1); } this.view = view; doLayout(); revalidate(); repaint(); }
/** Creates a new empty <code>JXTaskPane</code>. */ public JXTaskPane() { collapsePane = new JXCollapsiblePane(); super.setLayout(new BorderLayout(0, 0)); super.addImpl(collapsePane, BorderLayout.CENTER, -1); updateUI(); setFocusable(true); // disable animation if specified in UIManager setAnimated(!Boolean.FALSE.equals(UIManager.get("TaskPane.animate"))); // listen for animation events and forward them to registered listeners collapsePane.addPropertyChangeListener( JXCollapsiblePane.ANIMATION_STATE_KEY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { JXTaskPane.this.firePropertyChange( evt.getPropertyName(), evt.getOldValue(), evt.getNewValue()); } }); }