Java JSplitPane getSplitPaneComponentLength(JSplitPane splitPane, Component component)

Here you can find the source of getSplitPaneComponentLength(JSplitPane splitPane, Component component)

Description

get Split Pane Component Length

License

Open Source License

Declaration

private static double getSplitPaneComponentLength(JSplitPane splitPane,
            Component component) 

Method Source Code

//package com.java2s;
import java.awt.*;

import javax.swing.*;

public class Main {
    private static double getSplitPaneComponentLength(JSplitPane splitPane,
            Component component) {
        // The actual size may already have been messed up, so we use the preferred size.
        Dimension size = component.getPreferredSize();
        return (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) ? size
                .getWidth() : size.getHeight();
    }/*from   w  ww .  j  a va  2 s .c om*/
}

Related

  1. createUndecoratedSplitPane(int orientation)
  2. createVertSplitPane(Component left, Component right)
  3. flattenJSplitPane(JSplitPane splitPane)
  4. getPref(JSplitPane jSplitPane)
  5. getSplitPane(boolean vertical, JComponent left, JComponent right)
  6. getSplitPaneSize(JSplitPane splitPane)
  7. hsplit(Component left, Component right, double resizeWeight)
  8. rememberOldHeightRatio (JSplitPane splitPane)
  9. sanitizeSplitPaneDivider(JSplitPane splitPane)