Java 类org.eclipse.gef.AutoexposeHelper 实例源码

项目:ForgedUI-Eclipse    文件:PickerColumnEditPart.java   
public Object getAdapter(Class key) {
    if (key == AutoexposeHelper.class)
        return new ViewportAutoexposeHelper(this);
    if (key == ExposeHelper.class)
        return new ViewportExposeHelper(this);
    if (key == MouseWheelHelper.class)
        return new ViewportMouseWheelHelper(this);
    return super.getAdapter(key);
}
项目:ForgedUI-Eclipse    文件:ScrollViewEditPart.java   
public Object getAdapter(Class key) {
    if (key == AutoexposeHelper.class)
        return new ViewportAutoexposeHelper(this);
    if (key == ExposeHelper.class)
        return new ViewportExposeHelper(this);
    if (key == MouseWheelHelper.class)
        return new ViewportMouseWheelHelper(this);
    return super.getAdapter(key);
}
项目:PDFReporter-Studio    文件:CellResizeTracker.java   
/**
 * Updates the active {@link AutoexposeHelper}. Does nothing if there is still an active helper. Otherwise, obtains a
 * new helper (possible <code>null</code>) at the current mouse location and calls
 * {@link #setAutoexposeHelper(AutoexposeHelper)}.
 */
protected void updateAutoexposeHelper() {
    if (exposeHelper != null)
        return;
    AutoexposeHelper.Search search = new AutoexposeHelper.Search(getLocation());

    getCurrentViewer().findObjectAtExcluding(getLocation(), Collections.EMPTY_LIST, search);

    setAutoexposeHelper(search.result);
}
项目:PDFReporter-Studio    文件:BandResizeTracker.java   
/**
 * Updates the active {@link AutoexposeHelper}. Does nothing if there is still an active helper. Otherwise, obtains a
 * new helper (possible <code>null</code>) at the current mouse location and calls
 * {@link #setAutoexposeHelper(AutoexposeHelper)}.
 */
protected void updateAutoexposeHelper() {
    if (exposeHelper != null)
        return;
    AutoexposeHelper.Search search = new AutoexposeHelper.Search(getLocation());

    getCurrentViewer().findObjectAtExcluding(getLocation(), Collections.EMPTY_LIST, search);

    setAutoexposeHelper(search.result);
}
项目:PDFReporter-Studio    文件:JDRulerRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
    if (adapter == AutoexposeHelper.class) {
        if (((JDRulerEditPart) getContents()).isHorizontal())
            return new ViewportAutoexposeHelper(this, HORIZONTAL_THRESHOLD);
        return new ViewportAutoexposeHelper(this, VERTICAL_THRESHOLD);
    }
    return super.getAdapter(adapter);
}
项目:gef-gwt    文件:AbstractTransferDropTargetListener.java   
/**
 * Updates the active {@link AutoexposeHelper}. Does nothing if there is
 * still an active helper. Otherwise, obtains a new helper (possible
 * <code>null</code>) at the current mouse location and calls
 * {@link #setAutoexposeHelper(AutoexposeHelper)}.
 */
protected void updateAutoexposeHelper() {
    if (exposeHelper != null)
        return;
    AutoexposeHelper.Search search;
    search = new AutoexposeHelper.Search(getDropLocation());
    getViewer().findObjectAtExcluding(getDropLocation(),
            Collections.EMPTY_LIST, search);
    setAutoexposeHelper(search.result);
}
项目:gef-gwt    文件:RulerRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
public Object getAdapter(Class adapter) {
    if (adapter == AutoexposeHelper.class) {
        if (((RulerEditPart) getContents()).isHorizontal())
            return new ViewportAutoexposeHelper(this, HORIZONTAL_THRESHOLD);
        return new ViewportAutoexposeHelper(this, VERTICAL_THRESHOLD);
    }
    return super.getAdapter(adapter);
}
项目:gef-gwt    文件:TargetingTool.java   
/**
 * Updates the active {@link AutoexposeHelper}. Does nothing if there is
 * still an active helper. Otherwise, obtains a new helper (possible
 * <code>null</code>) at the current mouse location and calls
 * {@link #setAutoexposeHelper(AutoexposeHelper)}.
 */
protected void updateAutoexposeHelper() {
    if (exposeHelper != null)
        return;
    AutoexposeHelper.Search search;
    search = new AutoexposeHelper.Search(getLocation());
    getCurrentViewer().findObjectAtExcluding(getLocation(),
            Collections.EMPTY_LIST, search);
    setAutoexposeHelper(search.result);
}
项目:birt    文件:EditorRulerRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
public Object getAdapter( Class adapter )
{
    if ( adapter == AutoexposeHelper.class )
    {
        if ( ( (EditorRulerEditPart) getContents( ) ).isHorizontal( ) )
            return new ViewportAutoexposeHelper( this, HORIZONTAL_THRESHOLD );
        return new ViewportAutoexposeHelper( this, VERTICAL_THRESHOLD );
    }
    return super.getAdapter( adapter );
}
项目:birt    文件:ReportRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
public Object getAdapter( Class adapter )
{
    if ( adapter == AutoexposeHelper.class )
        return new ReportViewportAutoexposeHelper( this );
    if ( adapter == IModelEventProcessor.class )
    {
        return getContents( ).getAdapter( IModelEventProcessor.class );
    }
    return super.getAdapter( adapter );
}
项目:OpenSPIFe    文件:DebuggingTimelineTool.java   
@Override
protected AutoexposeHelper getAutoexposeHelper() {
    System.out.println("getAutoexposeHelper()");
    return super.getAutoexposeHelper();
}
项目:OpenSPIFe    文件:DebuggingTimelineTool.java   
@Override
protected void setAutoexposeHelper(AutoexposeHelper helper) {
    System.out.println("setAutoexposeHelper("+helper+")");
    super.setAutoexposeHelper(helper);
}
项目:gef-gwt    文件:FreeformGraphicalRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
public Object getAdapter(Class adapter) {
    if (adapter == AutoexposeHelper.class)
        return new ViewportAutoexposeHelper(this);
    return super.getAdapter(adapter);
}
项目:gef-gwt    文件:ScalableRootEditPart.java   
/**
 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
 */
public Object getAdapter(Class key) {
    if (key == AutoexposeHelper.class)
        return new ViewportAutoexposeHelper(this);
    return super.getAdapter(key);
}
项目:seg.jUCMNav    文件:URNRootEditPart.java   
public Object getAdapter(Class adapter) {
    if (adapter == AutoexposeHelper.class /* || adapter == ExposeHelper.class */)
        return new ViewportAutoexposeHelper(this, new Insets(50, 50, 50, 50));
    return super.getAdapter(adapter);
}
项目:PDFReporter-Studio    文件:CellResizeTracker.java   
/**
 * Sets the active autoexpose helper to the given helper, or <code>null</code>. If the helper is not <code>null</code>
 * , a runnable is queued on the event thread that will trigger a subsequent {@link #doAutoexpose()}. The helper is
 * typically updated only on a hover event.
 * 
 * @param helper
 *          the new autoexpose helper or <code>null</code>
 */
protected void setAutoexposeHelper(AutoexposeHelper helper) {
    exposeHelper = helper;
    if (exposeHelper == null)
        return;
    Display.getCurrent().asyncExec(new QueuedAutoexpose());
}
项目:PDFReporter-Studio    文件:BandResizeTracker.java   
/**
 * Sets the active autoexpose helper to the given helper, or <code>null</code>. If the helper is not <code>null</code>
 * , a runnable is queued on the event thread that will trigger a subsequent {@link #doAutoexpose()}. The helper is
 * typically updated only on a hover event.
 * 
 * @param helper
 *          the new autoexpose helper or <code>null</code>
 */
protected void setAutoexposeHelper(AutoexposeHelper helper) {
    exposeHelper = helper;
    if (exposeHelper == null)
        return;
    Display.getDefault().asyncExec(new QueuedAutoexpose());
}
项目:gef-gwt    文件:TargetingTool.java   
/**
 * Sets the active autoexpose helper to the given helper, or
 * <code>null</code>. If the helper is not <code>null</code>, a runnable is
 * queued on the event thread that will trigger a subsequent
 * {@link #doAutoexpose()}. The helper is typically updated only on a hover
 * event.
 * 
 * @param helper
 *            the new autoexpose helper or <code>null</code>
 */
protected void setAutoexposeHelper(AutoexposeHelper helper) {
    exposeHelper = helper;
    if (exposeHelper == null)
        return;
    Display.getCurrent().asyncExec(new QueuedAutoexpose());
}
项目:gef-gwt    文件:AbstractTransferDropTargetListener.java   
/**
 * Sets the current autoexpose helper.
 * 
 * @param helper
 *            the autoexpose helper
 */
protected void setAutoexposeHelper(AutoexposeHelper helper) {
    exposeHelper = helper;
}
项目:gef-gwt    文件:TargetingTool.java   
/**
 * Returns <code>null</code> or the current autoexpose helper.
 * 
 * @return null or a helper
 */
protected AutoexposeHelper getAutoexposeHelper() {
    return exposeHelper;
}