/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2018 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
*
* Contributors:
* VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - gitlab #146 - tooltip support
*******************************************************************************/
package org.simantics.browsing.ui.graph.impl.contributor.labeler;
this.clazz = clazz;
}
+ public boolean shouldCreateToolTip(Object event, T input) {
+ return false;
+ }
+
+ public Object createToolTipContentArea(Object event, Object parent, T input) {
+ return null;
+ }
+
@Override
public LabelerFactory getFactory() {
return ColumnLabelerContributorImpl.this.toString();
}
+ @Override
+ public boolean createToolTip(Object event, NodeContext nodeContext) {
+ T input = (T)context.getConstant(BuiltinKeys.INPUT);
+ return ColumnLabelerContributorImpl.this.shouldCreateToolTip(event, input);
+ }
+
+ @Override
+ public Object createToolTipContent(Object event, Object parent, NodeContext nodeContext) {
+ T input = (T)context.getConstant(BuiltinKeys.INPUT);
+ return ColumnLabelerContributorImpl.this.createToolTipContentArea(event, parent, input);
+ }
+
};
}