< prev index next >

src/java.desktop/share/classes/javax/swing/JSplitPane.java

Print this page




 360      * Sets the L&amp;F object that renders this component.
 361      *
 362      * @param ui  the <code>SplitPaneUI</code> L&amp;F object
 363      * @see UIDefaults#getUI
 364      */
 365     public void setUI(SplitPaneUI ui) {
 366         if ((SplitPaneUI)this.ui != ui) {
 367             super.setUI(ui);
 368             revalidate();
 369         }
 370     }
 371 
 372 
 373     /**
 374      * Returns the <code>SplitPaneUI</code> that is providing the
 375      * current look and feel.
 376      *
 377      * @return the <code>SplitPaneUI</code> object that renders this component
 378      */
 379     @BeanProperty(bound = false, expert = true, description
 380             = "The L&amp;F object that renders this component.")
 381     public SplitPaneUI getUI() {
 382         return (SplitPaneUI)ui;
 383     }
 384 
 385 
 386     /**
 387      * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 388      * Replaces the current UI object with the latest version from the
 389      * <code>UIManager</code>.
 390      *
 391      * @see JComponent#updateUI
 392      */
 393     public void updateUI() {
 394         setUI((SplitPaneUI)UIManager.getUI(this));
 395         revalidate();
 396     }
 397 
 398 
 399     /**
 400      * Returns the name of the L&amp;F class that renders this component.
 401      *
 402      * @return the string "SplitPaneUI"
 403      * @see JComponent#getUIClassID
 404      * @see UIDefaults#getUI
 405      */
 406     @BeanProperty(bound = false, expert = true, description
 407             = "A string that specifies the name of the L&amp;F class.")
 408     public String getUIClassID() {
 409         return uiClassID;
 410     }
 411 
 412 
 413     /**
 414      * Sets the size of the divider.
 415      *
 416      * @param newSize an integer giving the size of the divider in pixels
 417      */
 418     @BeanProperty(description
 419             = "The size of the divider.")
 420     public void setDividerSize(int newSize) {
 421         int           oldSize = dividerSize;
 422 
 423         dividerSizeSet = true;
 424         if (oldSize != newSize) {
 425             dividerSize = newSize;
 426             firePropertyChange(DIVIDER_SIZE_PROPERTY, oldSize, newSize);
 427         }


 807      * The value returned from this method may differ from the actual
 808      * divider location (if <code>setDividerLocation</code> was passed a
 809      * value bigger than the current size).
 810      *
 811      * @return an integer specifying the location of the divider
 812      */
 813     public int getDividerLocation() {
 814         return dividerLocation;
 815     }
 816 
 817 
 818     /**
 819      * Returns the minimum location of the divider from the look and feel
 820      * implementation.
 821      *
 822      * @return an integer specifying a UI-specific value for the minimum
 823      *          location (typically a pixel count); or -1 if the UI is
 824      *          <code>null</code>
 825      */
 826     @BeanProperty(bound = false, description
 827             = "The minimum location of the divider from the L&amp;F.")
 828     public int getMinimumDividerLocation() {
 829         SplitPaneUI         ui = getUI();
 830 
 831         if (ui != null) {
 832             return ui.getMinimumDividerLocation(this);
 833         }
 834         return -1;
 835     }
 836 
 837 
 838     /**
 839      * Returns the maximum location of the divider from the look and feel
 840      * implementation.
 841      *
 842      * @return an integer specifying a UI-specific value for the maximum
 843      *          location (typically a pixel count); or -1 if the  UI is
 844      *          <code>null</code>
 845      */
 846     @BeanProperty(bound = false)
 847     public int getMaximumDividerLocation() {




 360      * Sets the L&amp;F object that renders this component.
 361      *
 362      * @param ui  the <code>SplitPaneUI</code> L&amp;F object
 363      * @see UIDefaults#getUI
 364      */
 365     public void setUI(SplitPaneUI ui) {
 366         if ((SplitPaneUI)this.ui != ui) {
 367             super.setUI(ui);
 368             revalidate();
 369         }
 370     }
 371 
 372 
 373     /**
 374      * Returns the <code>SplitPaneUI</code> that is providing the
 375      * current look and feel.
 376      *
 377      * @return the <code>SplitPaneUI</code> object that renders this component
 378      */
 379     @BeanProperty(bound = false, expert = true, description
 380             = "The L&F object that renders this component.")
 381     public SplitPaneUI getUI() {
 382         return (SplitPaneUI)ui;
 383     }
 384 
 385 
 386     /**
 387      * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 388      * Replaces the current UI object with the latest version from the
 389      * <code>UIManager</code>.
 390      *
 391      * @see JComponent#updateUI
 392      */
 393     public void updateUI() {
 394         setUI((SplitPaneUI)UIManager.getUI(this));
 395         revalidate();
 396     }
 397 
 398 
 399     /**
 400      * Returns the name of the L&amp;F class that renders this component.
 401      *
 402      * @return the string "SplitPaneUI"
 403      * @see JComponent#getUIClassID
 404      * @see UIDefaults#getUI
 405      */
 406     @BeanProperty(bound = false, expert = true, description
 407             = "A string that specifies the name of the L&F class.")
 408     public String getUIClassID() {
 409         return uiClassID;
 410     }
 411 
 412 
 413     /**
 414      * Sets the size of the divider.
 415      *
 416      * @param newSize an integer giving the size of the divider in pixels
 417      */
 418     @BeanProperty(description
 419             = "The size of the divider.")
 420     public void setDividerSize(int newSize) {
 421         int           oldSize = dividerSize;
 422 
 423         dividerSizeSet = true;
 424         if (oldSize != newSize) {
 425             dividerSize = newSize;
 426             firePropertyChange(DIVIDER_SIZE_PROPERTY, oldSize, newSize);
 427         }


 807      * The value returned from this method may differ from the actual
 808      * divider location (if <code>setDividerLocation</code> was passed a
 809      * value bigger than the current size).
 810      *
 811      * @return an integer specifying the location of the divider
 812      */
 813     public int getDividerLocation() {
 814         return dividerLocation;
 815     }
 816 
 817 
 818     /**
 819      * Returns the minimum location of the divider from the look and feel
 820      * implementation.
 821      *
 822      * @return an integer specifying a UI-specific value for the minimum
 823      *          location (typically a pixel count); or -1 if the UI is
 824      *          <code>null</code>
 825      */
 826     @BeanProperty(bound = false, description
 827             = "The minimum location of the divider from the L&F.")
 828     public int getMinimumDividerLocation() {
 829         SplitPaneUI         ui = getUI();
 830 
 831         if (ui != null) {
 832             return ui.getMinimumDividerLocation(this);
 833         }
 834         return -1;
 835     }
 836 
 837 
 838     /**
 839      * Returns the maximum location of the divider from the look and feel
 840      * implementation.
 841      *
 842      * @return an integer specifying a UI-specific value for the maximum
 843      *          location (typically a pixel count); or -1 if the  UI is
 844      *          <code>null</code>
 845      */
 846     @BeanProperty(bound = false)
 847     public int getMaximumDividerLocation() {


< prev index next >