Package com.rakaizsys.eims

Source Code of com.rakaizsys.eims.MenuPanel

package com.rakaizsys.eims;

import javax.swing.JPanel;

import org.jdesktop.swingx.JXTitledPanel;
import org.jdesktop.swingx.JXTaskPane;
import net.miginfocom.swing.MigLayout;
import javax.swing.SpringLayout;

public class MenuPanel extends JXTitledPanel {
  private JXTaskPane taskPaneEmployees;
  private JXTaskPane taskPaneExpansas;
  private SpringLayout springLayout;

  /**
   * Create the panel.
   */
  public MenuPanel() {
    setTitle("Tasks");
    springLayout = new SpringLayout();
    getContentContainer().setLayout(springLayout);
    getContentContainer().add(getTaskPaneEmployees());
    getContentContainer().add(getTaskPaneExpansas());

  }

  protected JXTaskPane getTaskPaneEmployees() {
    if (taskPaneEmployees == null) {
      taskPaneEmployees = new JXTaskPane();
      this.springLayout.putConstraint(SpringLayout.NORTH, taskPaneEmployees, 7, SpringLayout.NORTH, getContentContainer());
      this.springLayout.putConstraint(SpringLayout.WEST, taskPaneEmployees, 7, SpringLayout.WEST, getContentContainer());
      taskPaneEmployees.setTitle("Employees");
    }
    return taskPaneEmployees;
  }
  protected JXTaskPane getTaskPaneExpansas() {
    if (taskPaneExpansas == null) {
      taskPaneExpansas = new JXTaskPane();
      this.springLayout.putConstraint(SpringLayout.NORTH, taskPaneExpansas, 6, SpringLayout.SOUTH, getTaskPaneEmployees());
      this.springLayout.putConstraint(SpringLayout.WEST, taskPaneExpansas, 0, SpringLayout.WEST, getTaskPaneEmployees());
      this.springLayout.putConstraint(SpringLayout.EAST, taskPaneExpansas, 108, SpringLayout.WEST, getContentContainer());
    }
    return taskPaneExpansas;
  }
}
TOP

Related Classes of com.rakaizsys.eims.MenuPanel

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.