Package org.apache.isis.viewer.dnd.view

Examples of org.apache.isis.viewer.dnd.view.FocusManager


    public void setKeyboardFocus(final View view) {
        if (view == null) {
            return;
        }

        final FocusManager currentFocusManager = keyboardManager.getFocusManager();
        if (currentFocusManager != null && currentFocusManager.getFocus() != null && currentFocusManager.getFocus().getParent() != null) {
            currentFocusManager.getFocus().getParent().markDamaged();
        }

        if (currentFocusManager != null) {
            final View currentFocus = currentFocusManager.getFocus();
            if (currentFocus != null && currentFocus != view) {
                currentFocus.focusLost();
            }
        }

        final FocusManager focusManager = view.getFocusManager();
        if (focusManager != null) {
            focusManager.setFocus(view);
            if (view.getParent() != null) {
                view.getParent().markDamaged();
            }
        }
        if (focusManager == null) {
View Full Code Here


        return undoStack;
    }

    @Override
    public boolean hasFocus(final View view) {
        final FocusManager focusManager = keyboardManager.getFocusManager();
        return focusManager != null && focusManager.getFocus() == view;
    }
View Full Code Here

        }
    }

    @Override
    public void saveCurrentFieldEntry() {
        final FocusManager focusManager = getFocusManager();
        if (focusManager != null) {
            final View focus = focusManager.getFocus();
            if (focus != null) {
                focus.editComplete(false, false);
                // change should be marked by the field being completed
                // focus.markDamaged();
            }
View Full Code Here

    public void setKeyboardFocus(final View view) {
        if (view == null) {
            return;
        }

        final FocusManager currentFocusManager = keyboardManager.getFocusManager();
        if (currentFocusManager != null && currentFocusManager.getFocus() != null && currentFocusManager.getFocus().getParent() != null) {
            currentFocusManager.getFocus().getParent().markDamaged();
        }

        if (currentFocusManager != null) {
            final View currentFocus = currentFocusManager.getFocus();
            if (currentFocus != null && currentFocus != view) {
                currentFocus.focusLost();
            }
        }

        final FocusManager focusManager = view.getFocusManager();
        if (focusManager != null) {
            focusManager.setFocus(view);
            if (view.getParent() != null) {
                view.getParent().markDamaged();
            }
        }
        if (focusManager == null) {
View Full Code Here

        return undoStack;
    }

    @Override
    public boolean hasFocus(final View view) {
        final FocusManager focusManager = keyboardManager.getFocusManager();
        return focusManager != null && focusManager.getFocus() == view;
    }
View Full Code Here

        }
    }

    @Override
    public void saveCurrentFieldEntry() {
        final FocusManager focusManager = getFocusManager();
        if (focusManager != null) {
            final View focus = focusManager.getFocus();
            if (focus != null) {
                focus.editComplete(false, false);
                // change should be marked by the field being completed
                // focus.markDamaged();
            }
View Full Code Here

    public void setKeyboardFocus(final View view) {
        if (view == null) {
            return;
        }

        final FocusManager currentFocusManager = keyboardManager.getFocusManager();
        if (currentFocusManager != null && currentFocusManager.getFocus() != null
            && currentFocusManager.getFocus().getParent() != null) {
            currentFocusManager.getFocus().getParent().markDamaged();
        }

        if (currentFocusManager != null) {
            final View currentFocus = currentFocusManager.getFocus();
            if (currentFocus != null && currentFocus != view) {
                currentFocus.focusLost();
            }
        }

        final FocusManager focusManager = view.getFocusManager();
        if (focusManager != null) {
            focusManager.setFocus(view);
            if (view.getParent() != null) {
                view.getParent().markDamaged();
            }
        }
        if (focusManager == null) {
View Full Code Here

        return undoStack;
    }

    @Override
    public boolean hasFocus(final View view) {
        final FocusManager focusManager = keyboardManager.getFocusManager();
        return focusManager != null && focusManager.getFocus() == view;
    }
View Full Code Here

        }
    }

    @Override
    public void saveCurrentFieldEntry() {
        final FocusManager focusManager = getFocusManager();
        if (focusManager != null) {
            final View focus = focusManager.getFocus();
            if (focus != null) {
                focus.editComplete(false, false);
                // change should be marked by the field being completed
                // focus.markDamaged();
            }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.view.FocusManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.