Java Code Examples for org.netbeans.api.visual.widget.Widget#getLayout()
The following examples show how to use
org.netbeans.api.visual.widget.Widget#getLayout() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LayoutFactory.java From netbeans with Apache License 2.0 | 4 votes |
/** * Sets active card of a specified widget where a card layout is used. * @param widget the widget with card layout * @param activeChildWidget the new active widget */ public static void setActiveCard (Widget widget, Widget activeChildWidget) { Layout layout = widget.getLayout (); if (layout instanceof CardLayout) ((CardLayout) layout).setActiveChildWidget (activeChildWidget); }
Example 2
Source File: LayoutFactory.java From netbeans with Apache License 2.0 | 2 votes |
/** * Returns active card of a specified widget where a card layout is used. * @param cardLayoutWidget the widget with card layout * @return the active widget */ public static Widget getActiveCard (Widget cardLayoutWidget) { Layout layout = cardLayoutWidget.getLayout (); return layout instanceof CardLayout ? ((CardLayout) layout).getActiveChildWidget () : null; }