Examples of ProtectedItemWrapper


Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     *
     * @return the protected item that is selected in the table viewer, or null.
     */
    private ProtectedItemWrapper getSelectedProtectedItemWrapper()
    {
        ProtectedItemWrapper protectedItemWrapper = null;

        IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
        if ( !selection.isEmpty() )
        {
            Object element = selection.getFirstElement();
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     * - enables/disables the edit button
     *
     */
    private void protectedItemSelected()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();

        if ( protectedItemWrapper == null || !protectedItemWrapper.isEditable() )
        {
            editButton.setEnabled( false );
        }
        else
        {
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     * Called, when pushing the edit button. Opens the text editor.
     *
     */
    private void editProtectedItem()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();

        AbstractDialogStringValueEditor valueEditor = protectedItemWrapper.getValueEditor();
        if ( valueEditor != null )
        {
            if ( protectedItemWrapper.isMultivalued() )
            {
                MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(),
                    protectedItemWrapper.getValues(), context, valueEditor );
                dialog.open();
                refreshTable();
            }
            else
            {
                List<String> values = protectedItemWrapper.getValues();
                String oldValue = values.isEmpty() ? null : values.get( 0 );
                if ( oldValue == null )
                {
                    oldValue = ""; //$NON-NLS-1$
                }
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

         */
        public Image getImage( Object element )
        {
            if ( element instanceof ProtectedItemWrapper )
            {
                ProtectedItemWrapper wrapper = ( ProtectedItemWrapper ) element;
                if ( tableViewer.getChecked( wrapper ) )
                {
                    try
                    {
                        wrapper.getProtectedItem();
                    }
                    catch ( ParseException e )
                    {
                        return Activator.getDefault().getImage(
                            Messages.getString( "ACIItemProtectedItemsComposite.error.icon" ) ); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     *
     * @return the protected item that is selected in the table viewer, or null.
     */
    private ProtectedItemWrapper getSelectedProtectedItemWrapper()
    {
        ProtectedItemWrapper protectedItemWrapper = null;

        IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
        if ( !selection.isEmpty() )
        {
            Object element = selection.getFirstElement();
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     * - enables/disables the edit button
     *
     */
    private void protectedItemSelected()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();

        if ( protectedItemWrapper == null || !protectedItemWrapper.isEditable() )
        {
            editButton.setEnabled( false );
        }
        else
        {
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

     * Called, when pushing the edit button. Opens the text editor.
     *
     */
    private void editProtectedItem()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();
       
        AbstractDialogStringValueEditor valueEditor = protectedItemWrapper.getValueEditor();
        if(valueEditor != null)
        {
            if(protectedItemWrapper.isMultivalued())
            {
                MultiValuedDialog dialog = new MultiValuedDialog( getShell(), protectedItemWrapper.getDisplayName(), protectedItemWrapper.getValues(), context, valueEditor );
                dialog.open();
                refreshTable();
            }
            else
            {
                List<String> values = protectedItemWrapper.getValues();
                String oldValue = values.isEmpty() ? null : values.get( 0 );
                if ( oldValue == null )
                {
                    oldValue = "";
                }
View Full Code Here

Examples of org.apache.directory.ldapstudio.aciitemeditor.model.ProtectedItemWrapper

         */
        public Image getImage( Object element )
        {
            if ( element instanceof ProtectedItemWrapper )
            {
                ProtectedItemWrapper wrapper = ( ProtectedItemWrapper ) element;
                if ( tableViewer.getChecked( wrapper ) )
                {
                    try
                    {
                        wrapper.getProtectedItem();
                    }
                    catch ( ParseException e )
                    {
                        return Activator.getDefault().getImage(
                            Messages.getString( "ACIItemProtectedItemsComposite.error.icon" ) ); //$NON-NLS-1$
View Full Code Here

Examples of org.apache.directory.studio.aciitemeditor.model.ProtectedItemWrapper

     *
     * @return the protected item that is selected in the table viewer, or null.
     */
    private ProtectedItemWrapper getSelectedProtectedItemWrapper()
    {
        ProtectedItemWrapper protectedItemWrapper = null;

        IStructuredSelection selection = ( IStructuredSelection ) tableViewer.getSelection();
        if ( !selection.isEmpty() )
        {
            Object element = selection.getFirstElement();
View Full Code Here

Examples of org.apache.directory.studio.aciitemeditor.model.ProtectedItemWrapper

     * - enables/disables the edit button
     *
     */
    private void protectedItemSelected()
    {
        ProtectedItemWrapper protectedItemWrapper = getSelectedProtectedItemWrapper();

        if ( protectedItemWrapper == null || !protectedItemWrapper.isEditable() )
        {
            editButton.setEnabled( false );
        }
        else
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.