height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setTitle(preferenceScreen.getTitle()); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
/** Connects buttons to action. * @param button the button * @param action the action */ public static void connect(AbstractButton button, BooleanStateAction action) { Bridge b = new BooleanButtonBridge(button, action); b.prepare(); }
/** Constructs a new menu item with the specified label * and no keyboard shortcut and connects it to the given SystemAction. * @param aAction the action to which this menu item should be connected * @param useMnemonic if true, the menu try to find mnemonic in action label */ public MenuItem(SystemAction aAction, boolean useMnemonic) { Actions.connect(this, aAction, !useMnemonic); }
public JMenuItem createMenuPresenter (Action action) { if (action instanceof BooleanStateAction) { BooleanStateAction b = (BooleanStateAction)action; return new Actions.CheckboxMenuItem (b, true); } if (action instanceof SystemAction) { SystemAction s = (SystemAction)action; return new Actions.MenuItem (s, true); } return new Actions.MenuItem (action, true); }
/** Attaches checkbox menu item to boolean state action. * @param item menu item * @param action action * @param popup create popup or menu item */ public static void connect(JCheckBoxMenuItem item, BooleanStateAction action, boolean popup) { Bridge b = new CheckMenuBridge(item, action, popup); b.prepare(); }
/** Checks whether a type is enabled. */ public <T> boolean isEnabled(Class<T> type, ContextSelection selectMode, ContextAction.Performer<? super T> enabler) { Lookup.Result<T> result = findResult(type); boolean e = isEnabledOnData(result, type, selectMode); if (e && enabler != null) { e = enabler.enabled(listFromResult(result)); } return e; }
public JComponent[] synchMenuPresenters(JComponent[] items) { if (bridge != null) { bridge.updateState(null); } return getMenuPresenters(); }
/** Setter method for the SwapPanesEnabled property. * @param value New SwapPanesEnabled value. */ public void setSwapPanesEnabled(boolean value) { if (swapPanesEnabled == value) { return; } swapPanesEnabled = value; updatePopupMenu(); }
public @Override void setBorder(Border b) { Border old = border; border = b; if (swingRendering) { firePropertyChange("border", old, b); } }
/** Clones itself with given context. */ public Action createContextAwareInstance(Lookup actionContext) { return new ContextAction<T>(performer, selectMode, actionContext, type, global.isSurvive()); }
@Override public void actionPerformed(ActionEvent e) { // Toggle state in preferences togglePreferencesSelected(); super.actionPerformed(e); }
/** * Sets whether the overflow should be displayed on hover or not. The * default value is <code>true</code>. * * @param displayOverflowOnHover if <code>true</code>, the overflow will be displayed on hover; * <code>false</code> otherwise */ public void setDisplayOverflowOnHover(boolean displayOverflowOnHover) { this.displayOverflowOnHover = displayOverflowOnHover; setupOverflowButton(); }
@Override public void clear() { msg.clear(0); } }
public @Override JMenuItem createPopupPresenter(Action action) { JMenuItem item; if (action instanceof BooleanStateAction) { BooleanStateAction b = (BooleanStateAction)action; item = new Actions.CheckboxMenuItem (b, false); } else if (action instanceof SystemAction) { SystemAction s = (SystemAction)action; item = new Actions.MenuItem (s, false); } else { item = new Actions.MenuItem (action, false); } return item; }
height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setTitle(preferenceScreen.getTitle()); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setTitle(preferenceScreen.getTitle()); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {
height = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics()); }else{ height = bar.getHeight(); bar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {