Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add column width recalculation when vertical scrollbar hidden/shown.
- If the Grid has any columns with non-fixed widths, the presence of a vertical scrollbar affects the column width calculations. Horizontal scrollbar should only be shown when actually needed.
- Loading branch information
Showing
6 changed files
with
160 additions
and
7 deletions.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
...n/java/com/vaadin/client/widget/grid/events/VerticalScrollbarVisibilityChangeHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Copyright 2000-2018 Vaadin Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
package com.vaadin.client.widget.grid.events; | ||
|
||
import com.google.gwt.event.shared.EventHandler; | ||
import com.google.gwt.event.shared.GwtEvent; | ||
|
||
/** | ||
* FOR INTERNAL USE ONLY, MAY GET REMOVED OR MODIFIED AT ANY TIME! | ||
* <p> | ||
* Event handler that gets notified when the visibility of the vertical | ||
* scrollbar of the Escalator changes. | ||
* | ||
* @author Vaadin Ltd | ||
*/ | ||
public interface VerticalScrollbarVisibilityChangeHandler | ||
extends EventHandler { | ||
|
||
/** | ||
* FOR INTERNAL USE ONLY, MAY GET REMOVED OR MODIFIED AT ANY TIME! | ||
* <p> | ||
* Called when the visibility of the vertical scrollbar of the Escalator | ||
* changes. | ||
* | ||
* @param event | ||
* the row visibility change event describing the change | ||
*/ | ||
void onVisibilityChange( | ||
VerticalScrollbarVisibilityChangeEvent event); | ||
|
||
/** | ||
* FOR INTERNAL USE ONLY, MAY GET REMOVED OR MODIFIED AT ANY TIME! | ||
* <p> | ||
* Event fired when the visibility of the vertical scrollbar of the | ||
* Escalator changes. | ||
* | ||
* @author Vaadin Ltd | ||
*/ | ||
public class VerticalScrollbarVisibilityChangeEvent extends | ||
GwtEvent<VerticalScrollbarVisibilityChangeHandler> { | ||
/** | ||
* FOR INTERNAL USE ONLY, MAY GET REMOVED OR MODIFIED AT ANY TIME! | ||
* <p> | ||
* The type of this event. | ||
*/ | ||
public static final Type<VerticalScrollbarVisibilityChangeHandler> TYPE = new Type<>(); | ||
|
||
/** | ||
* FOR INTERNAL USE ONLY, MAY GET REMOVED OR MODIFIED AT ANY TIME! | ||
* <p> | ||
* Creates a new Escalator vertical scrollbar visibility change event. | ||
* | ||
*/ | ||
public VerticalScrollbarVisibilityChangeEvent() { | ||
// NOP | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.google.gwt.event.shared.GwtEvent#getAssociatedType() | ||
*/ | ||
@Override | ||
public Type<VerticalScrollbarVisibilityChangeHandler> getAssociatedType() { | ||
return TYPE; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see | ||
* com.google.gwt.event.shared.GwtEvent#dispatch(com.google.gwt.event. | ||
* shared .EventHandler) | ||
*/ | ||
@Override | ||
protected void dispatch( | ||
VerticalScrollbarVisibilityChangeHandler handler) { | ||
handler.onVisibilityChange(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters