Java JSplitPane rememberOldHeightRatio (JSplitPane splitPane)

Here you can find the source of rememberOldHeightRatio (JSplitPane splitPane)

Description

remember Old Height Ratio

License

Open Source License

Declaration

static public float rememberOldHeightRatio (JSplitPane splitPane) 

Method Source Code

//package com.java2s;

import javax.swing.*;

public class Main {
    static public float rememberOldHeightRatio(JSplitPane splitPane) {
        int oldHeight = splitPane.getHeight();
        float oldFraction = ((oldHeight == 0) ? 0 : ((float) splitPane.getDividerLocation()) / oldHeight);

        return oldFraction;
    }//from  w  w  w. j a v a 2 s .  c o m
}

Related

  1. getPref(JSplitPane jSplitPane)
  2. getSplitPane(boolean vertical, JComponent left, JComponent right)
  3. getSplitPaneComponentLength(JSplitPane splitPane, Component component)
  4. getSplitPaneSize(JSplitPane splitPane)
  5. hsplit(Component left, Component right, double resizeWeight)
  6. sanitizeSplitPaneDivider(JSplitPane splitPane)
  7. setDividerLocation(final JSplitPane splitter, final int position)
  8. setNewHeightRatio (JSplitPane splitPane, JComponent comp, float oldFraction, int v1, int v2)
  9. setSplitDivider(final JSplitPane split, float proportion)