Package org.eclipse.swt.dnd

Examples of org.eclipse.swt.dnd.Clipboard.dispose()


        clipboard.setContents(new Object[] {
            builder.toString()
        }, new Transfer[] {
            transfer
        });
        clipboard.dispose();
    }

    private void appendLabels(Object unresolvedTreeElem, ITreeContentProvider contentProvider, StringBuilder builder, int indent) {
        for (int i = 0; i < indent; i++)
            builder.append("..");
View Full Code Here


        if (text != null && text.length() > 0) {
          text = LegacyActionTools.removeMnemonics(text);
          Clipboard cp = new Clipboard(e.display);
          cp.setContents(new Object[] { text },
              new Transfer[] { TextTransfer.getInstance() });
          cp.dispose();
        }
      }
    });
   
    fProgressIsVisible = false;
View Full Code Here

            return clipboard.getContents( dataType );
        }
        finally
        {
            if ( clipboard != null )
                clipboard.dispose();
        }
    }
}
View Full Code Here

            clipboard.setContents( data, dataTypes );
        }
        finally
        {
            if ( clipboard != null )
                clipboard.dispose();
        }
    }


    /**
 
View Full Code Here

                }
               
                clipBoard.setContents(new Object[]{filter},
                        new Transfer[]{UDigByteAndLocalTransfer.getInstance()});
            }finally {
                clipBoard.dispose();
            }

        }
    }
   
View Full Code Here

    protected void copyToClipboard(String toolTip) {
        Object[] data = new Object[] { toolTip };
        Transfer[] transfer = new Transfer[] { TextTransfer.getInstance() };
        Clipboard clipboard = new Clipboard(Display.getCurrent());
        clipboard.setContents(data, transfer);
        clipboard.dispose();
    }

    private void createHeader(StringBuilder sb) {
        switch (sortBy) {
        case BY_OVERALL_COUNT:
View Full Code Here

                for (int i = 0; i < selectionArray.length; i++) {
                    modelArray[i] = (VariantBuilder) ((Proxy) selectionArray[i]).getModelObject();
                }
                clipboard.setContents(new Object[]{modelArray},
                        new Transfer[]{transfer});
                clipboard.dispose();
            }
        };
        copyAction.setText(EditorMessages.getString(RESOURCE_PREFIX +
                "copy.action"));
View Full Code Here

                                context.executeOperation(addOperation);
                            }
                        }
                    }
                } finally {
                    clipboard.dispose();
                }
            }
        };
        pasteAction.setText(EditorMessages.getString(RESOURCE_PREFIX +
                "paste.action"));
View Full Code Here

                IStructuredSelection selection = (IStructuredSelection) targetViewer.getSelection();
                InternalTarget[] modelArray = new InternalTarget[selection.size()];
                modelArray = (InternalTarget[]) selection.toList().toArray(modelArray);
                clipboard.setContents(new Object[]{modelArray},
                        new Transfer[]{transfer});
                clipboard.dispose();
            }
        };
        copyAction.setText("Copy");

        pasteAction = new Action() {
View Full Code Here

                        }
                        setPolicyTargets();
                        targetViewer.refresh();
                    }
                } finally {
                    clipboard.dispose();
                }
            }
        };
        pasteAction.setText("Paste");
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.