All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.gv2011.util.swing.imp.builder.GvLayout Maven / Gradle / Ivy

There is a newer version: 0.12
Show newest version
package com.github.gv2011.util.swing.imp.builder;

import static com.github.gv2011.util.Verify.verifyEqual;
import static com.github.gv2011.util.ex.Exceptions.unsupported;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;

final class GvLayout implements LayoutManager{

  private final GuiImp gui;


  GvLayout(final GuiImp gui) {
    this.gui = gui;
  }

  @Override
  public void layoutContainer(final Container parent) {
    verifyEqual(parent, gui.contentPane());
    gui.layout(parent.getSize());
  }

  @Override
  public void addLayoutComponent(final String name, final Component comp) {
    unsupported();
  }

  @Override
  public void removeLayoutComponent(final Component comp) {
    unsupported();
  }

  @Override
  public Dimension preferredLayoutSize(final Container parent) {
    return unsupported();
  }

  @Override
  public Dimension minimumLayoutSize(final Container parent) {
    return unsupported();
  }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy