Exemplo n.º 1
0
 /**
  * Returns an enum indicating how the baseline of the component changes as the size changes.
  *
  * @throws NullPointerException {@inheritDoc}
  * @see javax.swing.JComponent#getBaseline(int, int)
  * @since 1.6
  */
 public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c) {
   super.getBaselineResizeBehavior(c);
   Border border = c.getBorder();
   if (border instanceof AbstractBorder) {
     return ((AbstractBorder) border).getBaselineResizeBehavior(c);
   }
   return Component.BaselineResizeBehavior.OTHER;
 }
Exemplo n.º 2
0
 /**
  * Returns the baseline.
  *
  * @throws NullPointerException {@inheritDoc}
  * @throws IllegalArgumentException {@inheritDoc}
  * @see javax.swing.JComponent#getBaseline(int, int)
  * @since 1.6
  */
 public int getBaseline(JComponent c, int width, int height) {
   super.getBaseline(c, width, height);
   Border border = c.getBorder();
   if (border instanceof AbstractBorder) {
     return ((AbstractBorder) border).getBaseline(c, width, height);
   }
   return -1;
 }
Exemplo n.º 3
0
 public void uninstallUI(JComponent c) {
   JPanel p = (JPanel) c;
   uninstallDefaults(p);
   super.uninstallUI(c);
 }
Exemplo n.º 4
0
 public void installUI(JComponent c) {
   JPanel p = (JPanel) c;
   super.installUI(p);
   installDefaults(p);
 }