implements the basic behavior of a CAB and multi select behavior onLongClick

@param act      the current Activity
@param position the position of the clicked item
@return the initialized ActionMode or null if nothing was done
501492
public ActionMode onLongClick(AppCompatActivity act, int position) {
        if (mActionMode == null && mFastAdapter.getItem(position).isSelectable()) {
            //may check if actionMode is already displayed
            mActionMode = act.startSupportActionMode(mInternalCallback);
            //we have to select this on our own as we will consume the event
            mSelectExtension.select(position);
            // update title
            checkActionMode(act, 1);
            //we consume this event so the normal onClick isn't called anymore
            return mActionMode;
        }
        return mActionMode;
    }
820907
private static IAction createAction(String action) {
        IAction actn = null;
        
        if (!StringUtils.isEmpty(action)) {
            if ((actn = ActionRegistry.getRegisteredAction(action)) == null) {
                actn = ActionUtil.createAction(null, action);
            }
        }
        
        return actn;
    }
356786
public FastAdapterDialog<Item> set(int position, Item item) {
        mItemAdapter.set(position, item);
        return this;
    }
1228497
@Override
    public int getItemViewType(int position) {
        if (shouldInsertItemAtPosition(position)) {
            return getItem(position).getType();
        } else {
            return mAdapter.getItemViewType(position - itemInsertedBeforeCount(position));
        }
    }
1041960
public void setAction(String action) {
        try {
            this.action = new URI(action);
        } catch (URISyntaxException e) {
            throw new CitrusRuntimeException("Invalid action uri", e);
        }
    }
249422
public VisDialog show (Stage stage, Action action) {
		clearActions();
		removeCaptureListener(ignoreTouchDown);

		previousKeyboardFocus = null;
		Actor actor = stage.getKeyboardFocus();
		if (actor != null && !actor.isDescendantOf(this)) previousKeyboardFocus = actor;

		previousScrollFocus = null;
		actor = stage.getScrollFocus();
		if (actor != null && !actor.isDescendantOf(this)) previousScrollFocus = actor;

		pack();
		stage.addActor(this);
		stage.setKeyboardFocus(this);
		stage.setScrollFocus(this);
		if (action != null) addAction(action);

		return this;
	}
1018715
public JButton add(Action act)
	{
		JButton _button;
		_button = super.add(act);
		_button.setRequestFocusEnabled(false);
		if (null != act.getValue(Action.SMALL_ICON))
		{
			_button.setToolTipText((String) act.getValue(Action.NAME));
			_button.setText(null);
		}
		return _button;
	}
631046
@Override
    public void position(long pos) {
        log.debug("position: {}", pos);
        currentFrame = getFrame(pos);
        log.debug("Setting current sample: {}", currentFrame);
    }
176715
public Item getItem(int position) {
        //if we are out of range just return null
        if (position < 0 || position >= mGlobalSize) {
            return null;
        }
        //now get the adapter which is responsible for the given position
        int index = floorIndex(mAdapterSizes, position);
        return mAdapterSizes.valueAt(index).getAdapterItem(position - mAdapterSizes.keyAt(index));
    }
841355
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	public ActionMode.Callback getCustomSelectionActionModeCallback (){
		if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
			return mInputView.getCustomSelectionActionModeCallback();

		return null;
	}
560147
public FastAdapterDialog<Item> add(int position, Item item) {
        mItemAdapter.add(position, item);
        return this;
    }
961498
public ModelAdapter<?, Item> set(int position, Item item) {
        if (mOriginalItems != null) {
            if (mItemAdapter.isUseIdDistributor()) {
                mItemAdapter.getIdDistributor().checkId(item);
            }
            mOriginalItems.set(getAdapterPosition(mItemAdapter.getAdapterItems().get(position)) - mItemAdapter.getFastAdapter().getPreItemCount(position), item);
            publishResults(mConstraint, performFiltering(mConstraint));
            return mItemAdapter;
        } else {
            return mItemAdapter.setInternal(position, item);
        }
    }
1067146
private Parameter getParameterByOrdinal(Integer position)
    {
        for (Parameter p : parameters)
        {
            if (position.equals(p.getPosition()))
            {
                return p;
            }
        }

        return null;
    }
720413
public com.google.iam.v1.BindingDelta.Action getAction() {
    com.google.iam.v1.BindingDelta.Action result = com.google.iam.v1.BindingDelta.Action.valueOf(action_);
    return result == null ? com.google.iam.v1.BindingDelta.Action.UNRECOGNIZED : result;
  }
739660
private void insertAction(final Action action, final FilterKey key) {
        if (filterMap.get(key) == null) {
            filterMap.put(key, action);
        } else {
            logger.info(MessageUtils.getMessage("DOTJ007I", key.toString()).toString());
        }
    }
75044
public void addAction(Action act) {
        if (act.entry != null && act.entry != this) {
            Log.e(TAG, "addAction failed. Already applied to another notification - " +
                  act.entry.ID + ". Current notification is " + ID);
            return;
        }
        if (mActions == null) {
            mActions = new ArrayList<Action>();
        }
        if (mActions.size() == 3) {
            Log.w(TAG, "only suppport up to 3 actions.");
            return;
        }
        act.entry = this;
        mActions.add(act);
    }
516263
public synchronized Interactable getInteractableAt(TerminalPosition position) {
        if (position.getRow() < 0 || position.getColumn() < 0) {
            return null;
        }
        if(position.getRow() >= lookupMap.length) {
            return null;
        }
        else if(position.getColumn() >= lookupMap[0].length) {
            return null;
        }
        else if(lookupMap[position.getRow()][position.getColumn()] == -1) {
            return null;
        }
        return interactables.get(lookupMap[position.getRow()][position.getColumn()]);
    }