コード例 #1
0
  float getRightProportion() {
    final float totalSize =
        myTopSplit.getOrientation() ? myTopSplit.getHeight() : myTopSplit.getWidth();
    final float componentSize = myTopSplit.getLastSize();

    return componentSize / (totalSize - 2.0f * myTopSplit.getDividerWidth());
  }
コード例 #2
0
 void setRightProportion(float proportion) {
   final int componentSize =
       myTopSplit.getOrientation() ? myTopSplit.getHeight() : myTopSplit.getWidth();
   myTopSplit.setLastSize(
       (int) (proportion * (float) (componentSize - 2 * myTopSplit.getDividerWidth())));
 }
コード例 #3
0
 void setLeftProportion(float proportion) {
   final int totalSize =
       myTopSplit.getOrientation() ? myTopSplit.getHeight() : myTopSplit.getWidth();
   myTopSplit.setFirstSize(
       (int) (proportion * (float) (totalSize - 2 * myTopSplit.getDividerWidth())));
 }