Class ResizablePanel

All Implemented Interfaces:
ResizableSupport, ImageObserver, MenuContainer, Serializable, Accessible

public class ResizablePanel extends JPanel implements ResizableSupport
ResizablePanel is a panel that can be resized. You can resize it from any of the four corners or four sides.
See Also:
  • Constructor Details

    • ResizablePanel

      public ResizablePanel()
      Creates a new ResizablePanel with a double buffer and a flow layout.
    • ResizablePanel

      public ResizablePanel(boolean isDoubleBuffered)
      Creates a new ResizablePanel with FlowLayout and the specified buffering strategy. If isDoubleBuffered is true, the JPanel will use a double buffer.
      Parameters:
      isDoubleBuffered - a boolean, true for double-buffering, which uses additional memory space to achieve fast, flicker-free updates
    • ResizablePanel

      public ResizablePanel(LayoutManager layout)
      Create a new buffered ResizablePanel with the specified layout manager
      Parameters:
      layout - the LayoutManager to use
    • ResizablePanel

      public ResizablePanel(LayoutManager layout, boolean isDoubleBuffered)
      Creates a new ResizablePanel with the specified layout manager and buffering strategy.
      Parameters:
      layout - the LayoutManager to use
      isDoubleBuffered - a boolean, true for double-buffering, which uses additional memory space to achieve fast, flicker-free updates
  • Method Details

    • initComponents

      protected void initComponents()
      Creates the Resizable class. It also set the panel's layout to BorderLayout.
    • createResizable

      protected Resizable createResizable()
      Creates the Resizable. Subclass class can override this method to create its own Resizable and tweak some options.
      Returns:
      Resizable.
    • getResizable

      public Resizable getResizable()
      Gets the Resizable.
      Specified by:
      getResizable in interface ResizableSupport
      Returns:
      the Resizable.
    • updateUI

      public void updateUI()
      Overrides the updateUI method to set border to resizable border defined in UIManagerLookup.getBorder("Resizable.resizeBorder")).
      Overrides:
      updateUI in class JPanel