本文整理汇总了Java中org.netbeans.api.visual.widget.Widget.revalidate方法的典型用法代码示例。如果您正苦于以下问题:Java Widget.revalidate方法的具体用法?Java Widget.revalidate怎么用?Java Widget.revalidate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.visual.widget.Widget
的用法示例。
在下文中一共展示了Widget.revalidate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mouseClicked
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
@Override
public final WidgetAction.State mouseClicked(Widget widget, WidgetAction.WidgetMouseEvent event) {
if (event.getButton() == MouseEvent.BUTTON1 && event.getClickCount() == 1) {
ObjectState widgetState = widget.getState();
boolean isFocused = widgetState.isObjectFocused();
ObjectState newWidgetState = widgetState.deriveObjectFocused(!isFocused);
unfocusAllWidgets(widget);
widget.setState(newWidgetState);
widget.revalidate();
String htmlDescription = getHtmlDescription();
if (htmlDescription != null) {
IPaletteActions paletteActions = ((ShedScene) widget.getScene()).getPaletteActions();
paletteActions.setHtmlDescription(htmlDescription);
}
return WidgetAction.State.CONSUMED;
}
return WidgetAction.State.REJECTED;
}
示例2: performLayout
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
protected void performLayout () {
devolveLayout.layout (widget);
for (Widget child : widget.getChildren ()) {
if (animate)
widget.getScene ().getSceneAnimator ().animatePreferredLocation (child, child.getLocation ());
else
child.setPreferredLocation (child.getLocation ());
child.revalidate ();
}
}
示例3: revalidateBranch
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
private void revalidateBranch(Widget branchRoot) {
for (Widget child : branchRoot.getChildren()) {
revalidateBranch(child);
//child.revalidate();
}
branchRoot.revalidate();
}
示例4: setLoopWidgets
import org.netbeans.api.visual.widget.Widget; //导入方法依赖的package包/类
public void setLoopWidgets(boolean visible) {
for (Widget w : this.loopidx2clusterwidget.values()) {
w.setVisible(visible);
w.revalidate();
}
this.loopClustersVisible = visible;
this.validate();
getPreferences().putBoolean(PREFERENCE_LOOP_CLUSTER, visible);
}