Package org.locationtech.udig.catalog.document

Examples of org.locationtech.udig.catalog.document.IHotlink


     *
     * @param doc
     */
    private void openAction(IDocument doc) {
       
        final IHotlink hotlinkDoc = (IHotlink) doc;
        final List<HotlinkDescriptor> descriptors = hotlinkDoc.getDescriptors();
       
        if (descriptors.size() > 1) {
            final ListDialog dialog = new ListDialog(openButton.getShell());
            dialog.setTitle(Messages.DocumentView_openActionDialogTitle);
            dialog.setMessage(Messages.DocumentView_openActionDialogMessage);
View Full Code Here


     *
     * @param doc
     */
    private void editHotlink(final IDocument doc) {
       
        final IHotlink hotlinkDoc = (IHotlink) doc;
        final String attributeName = hotlinkDoc.getAttributeName();
       
        final Map<String, Object> values = new HashMap<String, Object>();
        if (!doc.isEmpty()) {
            values.put(DocumentDialog.V_INFO, doc.getContent().toString());   
        }
        values.put(DocumentDialog.V_CONTENT_TYPE, doc.getContentType());
        values.put(DocumentDialog.V_ATTRIBUTE, attributeName);
        values.put(DocumentDialog.V_LABEL, doc.getLabel());
        values.put(DocumentDialog.V_DESCRIPTION, doc.getDescription());
        if (ContentType.ACTION == doc.getContentType()) {
            values.put(DocumentDialog.V_ACTIONS, hotlinkDoc.getDescriptors());
        }
       
        final Map<String, Object> params = new HashMap<String, Object>();
        params.put(DocumentDialog.P_TYPE, Type.HOTLINK);
        params.put(DocumentDialog.P_MODE, Mode.EDIT);
View Full Code Here

                    } else if (source instanceof IHotlinkSource) {
                        final IHotlinkSource featureHotlinkSource = (IHotlinkSource) source;
                        final Job clearHotlinkJob = new Job(Messages.DocumentView_clearHotlinkProgressMsg) {
                            @Override
                            protected IStatus run(IProgressMonitor monitor) {
                                final IHotlink hotlinkDoc = (IHotlink) doc;
                                final String attributeName = hotlinkDoc.getAttributeName();
                                boolean isCleared = featureHotlinkSource.clear(feature,
                                        attributeName, monitor);
                                if (isCleared) {
                                    isCleared = set(attributeName, null, monitor);
                                }
View Full Code Here

   
    @Override
    public IDocument getDocument(SimpleFeature feature, String attributeName, IProgressMonitor monitor) {
        for (IDocument doc : getDocsInternal(feature, monitor)) {
            if (doc instanceof IHotlink) {
                final IHotlink hotlinkDoc = (IHotlink) doc;
                if (attributeName.equals(hotlinkDoc.getAttributeName())) {
                    return hotlinkDoc;
                }
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.document.IHotlink

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.