/** * Constructs a new JXCollapsiblePane with a {@link JXPanel} as content pane and the specified * direction. * * @param direction * the direction to collapse the container */ public JXCollapsiblePane(Direction direction) { super.setLayout(new BorderLayout()); this.direction = direction; animator = new AnimationListener(); setAnimationParams(new AnimationParams(30, 8, 0.01f, 1.0f)); setContentPane(createContentPane()); setDirection(direction); // add an action to automatically toggle the state of the pane getActionMap().put(TOGGLE_ACTION, new ToggleAction()); }
/** * Constructs a new JXCollapsiblePane with a {@link JXPanel} as content pane and the specified * direction. * * @param direction * the direction to collapse the container */ public JXCollapsiblePane(Direction direction) { super.setLayout(new BorderLayout()); this.direction = direction; animator = new AnimationListener(); setAnimationParams(new AnimationParams(30, 8, 0.01f, 1.0f)); setContentPane(createContentPane()); setDirection(direction); // add an action to automatically toggle the state of the pane getActionMap().put(TOGGLE_ACTION, new ToggleAction()); }
/** * Constructs a new JXCollapsiblePane with a {@link JXPanel} as content pane and the specified * direction. * * @param direction * the direction to collapse the container */ public JXCollapsiblePane(Direction direction) { super.setLayout(new BorderLayout()); this.direction = direction; animator = new AnimationListener(); setAnimationParams(new AnimationParams(30, 8, 0.01f, 1.0f)); setContentPane(createContentPane()); setDirection(direction); // add an action to automatically toggle the state of the pane getActionMap().put(TOGGLE_ACTION, new ToggleAction()); }
/** * Constructs a new JXCollapsiblePane with a {@link JXPanel} as content pane and the specified * direction. * * @param direction * the direction to collapse the container */ public JXCollapsiblePane(Direction direction) { super.setLayout(new BorderLayout()); this.direction = direction; animator = new AnimationListener(); setAnimationParams(new AnimationParams(30, 8, 0.01f, 1.0f)); setContentPane(createContentPane()); setDirection(direction); // add an action to automatically toggle the state of the pane getActionMap().put(TOGGLE_ACTION, new ToggleAction()); }
/** * Constructs a new JXCollapsiblePane with a {@link JPanel} as content pane * and the given LayoutManager and orientation. A vertical orientation * enables a vertical {@link VerticalLayout} with a gap of 2 pixels as * layout manager. A horizontal orientation enables a horizontal * {@link HorizontalLayout} with a gap of 2 pixels as layout manager * * @param direction * the direction this pane collapses * @param layout * of this collapsible pane */ public JXCollapsiblePane(Direction direction, LayoutManager layout) { super.setLayout(layout); this.direction = direction; animator = new AnimationListener(); setAnimationParams(new AnimationParams(30, 8, 0.01f, 1.0f)); JXPanel panel = new JXPanel(); setContentPane(panel); setDirection(direction); // add an action to automatically toggle the state of the pane getActionMap().put(TOGGLE_ACTION, new ToggleAction()); }
int dimension = direction.isVertical() ? wrapper.getHeight() : wrapper.getWidth(); setAnimationParams(new AnimationParams(30, Math.max(8, dimension / 10), 1.0f, 0.01f)); animator.reinit(dimension, 0); int delta = Math.max(8, preferredDimension / 10); setAnimationParams(new AnimationParams(30, delta, 0.01f, 1.0f)); animator.reinit(dimension, preferredDimension); animateTimer.start();
int delta = Math.max(8, preferredDimension / 10); setAnimationParams(new AnimationParams(30, delta, 0.01f, 1.0f)); animator.reinit(dimension, preferredDimension); wrapper.getView().setVisible(true); } else { int dimension = direction.isVertical() ? wrapper.getHeight() : wrapper.getWidth(); setAnimationParams(new AnimationParams(30, Math.max(8, dimension / 10), 1.0f, 0.01f)); animator.reinit(dimension, 0);
int delta = Math.max(8, preferredDimension / 10); setAnimationParams(new AnimationParams(30, delta, 0.01f, 1.0f)); animator.reinit(dimension, preferredDimension); wrapper.getView().setVisible(true); } else { int dimension = direction.isVertical() ? wrapper.getHeight() : wrapper.getWidth(); setAnimationParams(new AnimationParams(30, Math.max(8, dimension / 10), 1.0f, 0.01f)); animator.reinit(dimension, 0);
int delta = Math.max(8, preferredDimension / 10); setAnimationParams(new AnimationParams(30, delta, 0.01f, 1.0f)); animator.reinit(dimension, preferredDimension); wrapper.getView().setVisible(true); } else { int dimension = direction.isVertical() ? wrapper.getHeight() : wrapper.getWidth(); setAnimationParams(new AnimationParams(30, Math.max(8, dimension / 10), 1.0f, 0.01f)); animator.reinit(dimension, 0);
int delta = Math.max(8, preferredDimension / 10); setAnimationParams(new AnimationParams(30, delta, 0.01f, 1.0f)); animator.reinit(dimension, preferredDimension); wrapper.getView().setVisible(true); } else { int dimension = direction.isVertical() ? wrapper.getHeight() : wrapper.getWidth(); setAnimationParams(new AnimationParams(30, Math.max(8, dimension / 10), 1.0f, 0.01f)); animator.reinit(dimension, 0);