Package javax.swing

Examples of javax.swing.JSplitPane.addPropertyChangeListener()


      splitPane.setContinuousLayout(true);
      splitPane.setOneTouchExpandable(true);
      splitPane.setLeftComponent(components[0]);
      splitPane.setRightComponent(components[1]);
      splitPane.setBorder(BorderFactory.createEmptyBorder());
      splitPane.addPropertyChangeListener("dividerLocation",
          new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
              if(!MainFrame.isStarting()) {
                int oldValue = ((Integer) evt.getOldValue()).intValue();
                int dividerLocation = ((Integer) evt.getNewValue()).intValue();
View Full Code Here


  }
 
  public void test(TestHarness harness)
  {
    JSplitPane s = new JSplitPane();
    s.addPropertyChangeListener(this);
    s.setResizeWeight(0.33);
    harness.check(s.getResizeWeight(), 0.33);
    harness.check(events.size(), 1);
    PropertyChangeEvent pce = (PropertyChangeEvent) events.get(0);
    harness.check(pce.getPropertyName(), "resizeWeight");
View Full Code Here

            splitPane.setDividerSize(4);
            GUIConfiguration guiConfiguration = GUIConfiguration.getInstance();
            int mainHorizontalSplitDividerLocation= guiConfiguration.getInt(MAIN_HORIZONTAL_SPLIT_DIVIDER_LOCATION_PROPERTY, 285);
            splitPane.setDividerLocation(mainHorizontalSplitDividerLocation);
           
            splitPane.addPropertyChangeListener(new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent evt) {
                    if (evt.getPropertyName().equals("dividerLocation")) {
                        GUIConfiguration guiConfiguration = GUIConfiguration.getInstance();
                        if (evt.getSource() instanceof JSplitPane) {
                            JSplitPane splitPane= (JSplitPane)evt.getSource();
View Full Code Here

        /**
         * As of CAY-888 #3 main pane is now a JSplitPane. Top component is a bit larger.
         */
        JSplitPane mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        mainPanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, this);
        mainPanel.setDividerLocation(location);

        mainPanel.setTopComponent(createEditorPanel());
        mainPanel.setBottomComponent(createSelectorPanel());

View Full Code Here

        /**
         * As of CAY-888 #3 main pane is now a JSplitPane.
         * Top component is a bit larger.
         */
        JSplitPane mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        mainPanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, this);
        mainPanel.setDividerLocation(location);
       
        mainPanel.setTopComponent(createEditorPanel());
        mainPanel.setBottomComponent(createSelectorPanel());

View Full Code Here

        /**
         * As of CAY-888 #3 main pane is now a JSplitPane. Top component is a bit larger.
         */
        JSplitPane mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        mainPanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, this);
        mainPanel.setDividerLocation(location);

        mainPanel.setTopComponent(createEditorPanel());
        mainPanel.setBottomComponent(createSelectorPanel());

View Full Code Here

        add(BorderLayout.CENTER,split);
        int dl=PreferencesForABProject.userNodeForABProject.getInt(AB_PANE_SPLITTER_REG_KEY,300);
        dl=Math.max(dl, lc.getPreferredSize().width);
        dl=Math.max(dl, buttonPane.getPreferredSize().width);
        split.setDividerLocation(dl);
        split.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY,new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent e) {
                try {
                  PreferencesForABProject.userNodeForABProject.putInt(nc, AB_PANE_SPLITTER_REG_KEY,
                            split.getDividerLocation());
                } catch (Exception e1) {
View Full Code Here

    tableSorter = new TableRowSorter<HeadsTableModel>(tableModel);

    final JSplitPane splitPane = new JSplitPane();
    splitPane.setContinuousLayout(true);
    splitPane.setDividerLocation(prefs.getInt(PREF_DIVIDER_POSITION, PREF_DIVIDER_POSITION_DEF));
    splitPane.addPropertyChangeListener("dividerLocation",
        new PropertyChangeListener() {
          @Override
          public void propertyChange(PropertyChangeEvent evt) {
            prefs.putInt(PREF_DIVIDER_POSITION,
                splitPane.getDividerLocation());
View Full Code Here

    tableSorter = new TableRowSorter<ActuatorsTableModel>(tableModel);

    final JSplitPane splitPane = new JSplitPane();
    splitPane.setContinuousLayout(true);
    splitPane.setDividerLocation(prefs.getInt(PREF_DIVIDER_POSITION, PREF_DIVIDER_POSITION_DEF));
    splitPane.addPropertyChangeListener("dividerLocation",
        new PropertyChangeListener() {
          @Override
          public void propertyChange(PropertyChangeEvent evt) {
            prefs.putInt(PREF_DIVIDER_POSITION,
                splitPane.getDividerLocation());
View Full Code Here

    final JSplitPane splitPane = new JSplitPane();
    splitPane.setBorder(null);
    splitPane.setContinuousLayout(true);
    splitPane.setDividerLocation(prefs.getInt(PREF_DIVIDER_POSITION,
        PREF_DIVIDER_POSITION_DEF));
    splitPane.addPropertyChangeListener("dividerLocation",
        new PropertyChangeListener() {
          @Override
          public void propertyChange(PropertyChangeEvent evt) {
            prefs.putInt(PREF_DIVIDER_POSITION,
                splitPane.getDividerLocation());
View Full Code Here

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.