Sets the underlying objective_bank view to match current view
170070
def _set_objective_bank_view(self, session):
        """"""
        if self._objective_bank_view == FEDERATED:
            try:
                session.use_federated_objective_bank_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_isolated_objective_bank_view()
            except AttributeError:
                pass
332770
def create_objective_bank(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.create_bin
        return ObjectiveBank(
            self._provider_manager,
            self._get_provider_session('objective_bank_admin_session').create_objective_bank(*args, **kwargs),
            self._runtime,
            self._proxy)
1293060
def change_view(self, request, object_id, form_url='', extra_context=None):
        """"""

        obj = self.get_object(request, unquote(object_id))

        if obj is None:
            raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {
                'name': force_text(self.opts.verbose_name),
                'key': escape(object_id),
            })

        if not self.has_change_permission(request, obj):
            raise PermissionDenied

        content_block = obj.content_block
        version = content_block.obj_version

        # Version must not be saved, and must belong to this user
        if version.version_number or version.owner != request.user:
            raise PermissionDenied

        return super().change_view(request, object_id, form_url, extra_context)
433126
def _set_bin_view(self, session):
        """"""
        if self._bin_view == COMPARATIVE:
            try:
                session.use_comparative_bin_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_bin_view()
            except AttributeError:
                pass
1223263
def findViewWithAttributeOrRaise(self, attr, val, root="ROOT"):
        '''
        
        '''

        view = self.findViewWithAttribute(attr, val, root)
        if view:
            return view
        else:
            raise ViewNotFoundException(attr, val, root)
844185
def patch_view_model(view_cls, model_cls):
    
    original_model = view_cls.Model
    view_cls.Model = model_cls

    try:
        yield
    finally:
        view_cls.Model = original_model
389601
def as_view(cls, action_map=None, **initkwargs):
        

        # Needs to re-implement the method but contains all the things the parent does.
        if not action_map:  # actions must not be empty
            raise TypeError("action_map is a required argument.")

        def view(request):
            self = cls(**initkwargs)
            self.request = request
            self.lookup_url_kwargs = self.request.matchdict
            self.action_map = action_map
            self.action = self.action_map.get(self.request.method.lower())

            for method, action in action_map.items():
                handler = getattr(self, action)
                setattr(self, method, handler)

            return self.dispatch(self.request, **self.request.matchdict)

        return view
746609
def use_plenary_objective_view(self):
        """"""
        self._object_views['objective'] = PLENARY
        # self._get_provider_session('objective_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_objective_view()
            except AttributeError:
                pass
910011
def set_parent_view(self, parent_view):
        
        top = self.get_top_widget()
        if isinstance(top, (list, tuple)):
            for t in top:
                if t is not None:
                    t.set_transient_for(parent_view.get_top_widget())
        elif top is not None:
            top.set_transient_for(parent_view.get_top_widget())
603492
function VView(view, data, key, opts) {
	this.view = view;
	this.data = data;
	this.key = key;
	this.opts = opts;
}
505849
def register_view_for(cls, app, action, classview, attr):
        
        if 'view_for_endpoints' not in cls.__dict__:
            cls.view_for_endpoints = {}
        cls.view_for_endpoints.setdefault(app, {})[action] = (classview, attr)
284431
function(x, y, w, h) {
            var self = this;
            // Update current value
            self.currentViewBox.x = x;
            self.currentViewBox.y = y;
            self.currentViewBox.w = w;
            self.currentViewBox.h = h;
            // Perform set view box
            self.paper.setViewBox(x, y, w, h, false);
        }
1105764
def _set_operable_view(self, session):
        """"""
        for obj_name in self._operable_views:
            if self._operable_views[obj_name] == ACTIVE:
                try:
                    getattr(session, 'use_active_' + obj_name + '_view')()
                except AttributeError:
                    pass
            else:
                try:
                    getattr(session, 'use_any_status_' + obj_name + '_view')()
                except AttributeError:
                    pass
522732
def _apply_orthogonal_view(self):
        
        left, right, bottom, top = self.get_view_coordinates()
        glOrtho(left, right, bottom, top, -10, 0)
1138640
def change_view(self, *args, **kwargs):
        """"""
        Hierarchy.init_hierarchy(self)

        self.hierarchy.hook_change_view(self, args, kwargs)

        return super(HierarchicalModelAdmin, self).change_view(*args, **kwargs)
169666
def set_objective_sense(self, sense):
        """"""

        if sense not in (ObjectiveSense.Minimize, ObjectiveSense.Maximize):
            raise ValueError('Invalid objective sense')

        swiglpk.glp_set_obj_dir(self._p, self.OBJ_SENSE_MAP[sense])
1258771
private void adaptTabLayoutVisibility() {
        if (tabLayout != null) {
            tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
        }
    }