text:
package org.olat.core.commons.services.mark.ui;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

import org.olat.ControllerFactory;
import org.olat.NewControllerFactory;
import org.olat.core.CoreSpringFactory;
import org.olat.core.commons.services.mark.Mark;
import org.olat.core.commons.services.mark.MarkManager;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.link.Link;
import org.olat.core.gui.components.link.LinkFactory;
import org.olat.core.gui.components.table.ColumnDescriptor;
import org.olat.core.gui.components.table.DefaultColumnDescriptor;
import org.olat.core.gui.components.table.Table;
import org.olat.core.gui.components.table.TableController;
import org.olat.core.gui.components.table.TableEvent;
import org.olat.core.gui.components.table.TableGuiConfiguration;
import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.portal.AbstractPortletRunController;
import org.olat.core.gui.control.generic.portal.PortletDefaultTableDataModel;
import org.olat.core.gui.control.generic.portal.PortletEntry;
import org.olat.core.gui.control.generic.portal.PortletToolSortingControllerImpl;
import org.olat.core.gui.control.generic.portal.SortingCriteria;
import org.olat.core.gui.translator.PackageTranslator;
import org.olat.core.gui.translator.Translator;
import org.olat.core.id.context.BusinessControl;
import org.olat.core.id.context.BusinessControlFactory;
import org.olat.core.util.filter.FilterFactory;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.RepositoryEntryStatus;
import org.olat.repository.RepositoryManager;

/**
 * Description:

 * Run view controller for the groups list portlet
 *

 * Initial Date:  11.07.2005

 * @author gnaegi
 */
public class BookmarksPortletRunController extends AbstractPortletRunController<Bookmark> {

	private static final String CMD_LAUNCH = "cmd.launch";

	private TableController tableCtr;
	private BookmarkPortletTableDataModel bookmarkListModel;
	private VelocityContainer bookmarksVC;
	private Link showAllLink;

	private final MarkManager markManager;
	private final RepositoryManager repositoryManager;
	private final List<String> types = Collections.singletonList("RepositoryEntry");

	/**
	 * Constructor
	 * @param ureq
	 * @param component
	 */
	public BookmarksPortletRunController(WindowControl wControl, UserRequest ureq, Translator trans,
			String portletName, int defaultMaxEntries) {
		super(wControl, ureq, trans, portletName, defaultMaxEntries);
		sortingTermsList.add(SortingCriteria.TYPE_SORTING);
		sortingTermsList.add(SortingCriteria.ALPHABETICAL_SORTING);
		sortingTermsList.add(SortingCriteria.DATE_SORTING);

		repositoryManager = RepositoryManager.getInstance();
		markManager = CoreSpringFactory.getImpl(MarkManager.class);

		bookmarksVC = createVelocityContainer("bookmarksPortlet");
		showAllLink = LinkFactory.createLink("bookmarksPortlet.showAll", bookmarksVC, this);

		TableGuiConfiguration tableConfig = new TableGuiConfiguration();
		tableConfig.setTableEmptyMessage(trans.translate("bookmarksPortlet.nobookmarks"));
		tableConfig.setDisplayTableHeader(false);
		tableConfig.setCustomCssClass("b_portlet_table");
		tableConfig.setDisplayRowCount(false);
		tableConfig.setPageingEnabled(false);
		tableConfig.setDownloadOffered(false);
		//disable the default sorting for this table
		tableConfig.setSortingEnabled(false);
		tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans);
		listenTo(tableCtr);
		// dummy header key, won't be used since setDisplayTableHeader is set to false
		tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("bookmarksPortlet.bgname", 0, CMD_LAUNCH, trans.getLocale()));
		tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("bookmarksPortlet.type", 1, null, trans.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));

		sortingCriteria = getPersistentSortingConfiguration(ureq);
		reloadModel(sortingCriteria);

		bookmarksVC.put("table", tableCtr.getInitialComponent());
		putInitialPanel(bookmarksVC);
	}

	/**
	 * Gets all bookmarks for this identity and converts the list into an PortletEntry list.
	 * @param ureq
	 * @return
	 */
	private List<PortletEntry<Bookmark>> getAllPortletEntries() {
		List markList = markManager.getMarks(getIdentity(), types);
		List<Bookmark> bookmarkList = convertMarkToBookmark(markList);
		return convertBookmarkToPortletEntryList(bookmarkList);
	}

	/**
	 * Converts list.
	 * @param items
	 * @return
	 */
	private List<PortletEntry<Bookmark>> convertBookmarkToPortletEntryList(List<Bookmark> items) {
		List<PortletEntry<Bookmark>> convertedList = new ArrayList<PortletEntry<Bookmark>>();
		for(Bookmark mark:items) {
			convertedList.add(new BookmarkPortletEntry(mark));
		}
		return convertedList;
	}

	private  List<Bookmark> convertMarkToBookmark(List items) {
		List<Bookmark> convertedList = new ArrayList<Bookmark>();

		List<Long> reKeys = new ArrayList<Long>();
		for(Mark mark:items) {
			reKeys.add(mark.getOLATResourceable().getResourceableId());
		}

		List<RepositoryEntry> repositoryEntries = repositoryManager.lookupRepositoryEntries(reKeys);
		Map<Long,RepositoryEntry> keyToRepositoryEntryMap = new HashMap<Long,RepositoryEntry>();
		for(RepositoryEntry repositoryEntry:repositoryEntries) {
			keyToRepositoryEntryMap.put(repositoryEntry.getKey(), repositoryEntry);
		}

		for(Mark mark:items) {
			RepositoryEntry repositoryEntry = keyToRepositoryEntryMap.get(mark.getOLATResourceable().getResourceableId());
			if(repositoryEntry != null) {
				convertedList.add(new Bookmark(mark, repositoryEntry));
			}
		}
		return convertedList;
	}

	/**
	 * Reloads the bookmarks table model according with the input SortingCriteria.
	 * It first evaluate the sortingCriteria type; if auto get bookmarks from BookmarkManager
	 * and sort the item list according with the sortingCriteria.
	 * Else get the manually sorted list.
	 * @param identity
	 * @param sortingCriteria
	 */
	protected void reloadModel(SortingCriteria sortingCriteria) {
		if (sortingCriteria.getSortingType() == SortingCriteria.AUTO_SORTING) {
			List markList = markManager.getMarks(getIdentity(), types);
			List<Bookmark> bookmarkList = convertMarkToBookmark(markList);
			bookmarkList = getSortedList(bookmarkList, sortingCriteria );

			List<PortletEntry<Bookmark>> entries = convertBookmarkToPortletEntryList(bookmarkList);
			bookmarkListModel = new BookmarkPortletTableDataModel(entries, getLocale());
			tableCtr.setTableDataModel(bookmarkListModel);
		} else {
			reloadModel(this.getPersistentManuallySortedItems());
		}
	}

	/**
	 * Sets the table model if the sorted items list is already available.
	 * @param ureq
	 * @param sortedItems
	 */
	protected void reloadModel(List<PortletEntry<Bookmark>> sortedItems) {
		bookmarkListModel = new BookmarkPortletTableDataModel(sortedItems, getLocale());
		tableCtr.setTableDataModel(bookmarkListModel);
	}

	/**
	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
	 */
	public void event(UserRequest ureq, Component source, Event event) {
		if (source == showAllLink){
			// activate homes tab in top navigation and active bookmarks menu item
			String resourceUrl = "[HomeSite:" + ureq.getIdentity().getKey() + "][bookmarks:0]";
			BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
			WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
			NewControllerFactory.getInstance().launch(ureq, bwControl);
		}
	}

	/**
	 * @see org.olat.core.gui.control.ControllerEventListener#dispatchEvent(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
	 */
	@Override
	public void event(UserRequest ureq, Controller source, Event event) {
		super.event(ureq, source, event);
		if (source == tableCtr) {
			if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
				TableEvent te = (TableEvent) event;
				String actionid = te.getActionId();
				if (actionid.equals(CMD_LAUNCH)) {
					int rowid = te.getRowId();
					PortletEntry<Bookmark> bookmark = bookmarkListModel.getObject(rowid);
					String businessPath = bookmark.getValue().getBusinessPath();
					NewControllerFactory.getInstance().launch(businessPath, ureq, getWindowControl());
				}
			}
		}
	}

  /**
   * Retrieve the persistent manually sorted items for the current portlet.
   * @param ureq
   * @return
   */
  private List<PortletEntry<Bookmark>> getPersistentManuallySortedItems() {
  	List<PortletEntry<Bookmark>> entries = getAllPortletEntries();
		return getPersistentManuallySortedItems(entries);
	}

	/**
	 * Retrieves the persistent sortingCriteria and the persistent manually sorted, if any,
	 * creates the table model for the manual sorting, and instantiates the PortletToolSortingControllerImpl.
	 * @param ureq
	 * @param wControl
	 * @return a PortletToolSortingControllerImpl istance.
	 */
	protected PortletToolSortingControllerImpl<Bookmark> createSortingTool(UserRequest ureq, WindowControl wControl) {
		if(portletToolsController==null) {
			List<PortletEntry<Bookmark>> entries = getAllPortletEntries();
			PortletDefaultTableDataModel<Bookmark> tableDataModel = new BookmarkManualSortingTableDataModel(entries, ureq.getLocale());

			List<PortletEntry<Bookmark>> sortedItems = getPersistentManuallySortedItems();

			portletToolsController = new PortletToolSortingControllerImpl<Bookmark>(ureq, wControl, getTranslator(), sortingCriteria, tableDataModel, sortedItems);
			listenTo(portletToolsController);
			portletToolsController.setConfigManualSorting(true);
			portletToolsController.setConfigAutoSorting(true);
		}
		return portletToolsController;
	}

	/**
	 * Comparator implementation used for sorting bookmarks entries according with the
	 * input sortingCriteria.
	 *

	 * @param sortingCriteria
	 * @return a Comparator for the input sortingCriteria
	 */
	protected Comparator<Bookmark> getComparator(final SortingCriteria sortingCriteria) {
		return new Comparator<Bookmark>(){
			public int compare(final Bookmark bookmark1, final Bookmark bookmark2) {
				int comparisonResult = 0;
			  if(sortingCriteria.getSortingTerm()==SortingCriteria.ALPHABETICAL_SORTING) {
			  	comparisonResult = collator.compare(bookmark1.getTitle(), bookmark2.getTitle());
			  } else if(sortingCriteria.getSortingTerm()==SortingCriteria.DATE_SORTING) {
			  	comparisonResult = bookmark1.getCreationDate().compareTo(bookmark2.getCreationDate());
			  } else if(sortingCriteria.getSortingTerm()==SortingCriteria.TYPE_SORTING) {
			  	comparisonResult = bookmark1.getDisplayrestype().compareTo(bookmark2.getDisplayrestype());
			  }
			  if(!sortingCriteria.isAscending()) {
			  	//if not isAscending return (-comparisonResult)
			  	return -comparisonResult;
			  }
			  return comparisonResult;
			}};
	}

	/**
	 *
	 * PortletDefaultTableDataModel implementation for the current portlet.
	 *
	 *

	 * Initial Date:  10.12.2007

	 * @author Lavinia Dumitrescu
	 */
	private static class BookmarkPortletTableDataModel extends PortletDefaultTableDataModel<Bookmark> {
		private final Locale locale;

		public BookmarkPortletTableDataModel(List<PortletEntry<Bookmark>> objects, Locale locale) {
			super(objects, 2);
			this.locale = locale;
		}

		public Object getValueAt(int row, int col) {
			PortletEntry<Bookmark> entry = getObject(row);
			Bookmark bookmark = entry.getValue();
			switch (col) {
			case 0:
				String name = getBookmarkTitle(bookmark);
				return name;
			case 1:
				String resType = bookmark.getDisplayrestype();
				return ControllerFactory.translateResourceableTypeName(resType, locale);
			default:
				return "ERROR";
			}
    }

		/**
		 * Get displayname of a bookmark entry. If bookmark entry a RepositoryEntry
		 * and is this RepositoryEntry closed then add a prefix to the title.
		 */
		private String getBookmarkTitle(Bookmark bookmark) {
			String title = bookmark.getTitle();
			if (RepositoryManager.getInstance().createRepositoryEntryStatus(bookmark.getStatusCode()).isClosed()) {
				PackageTranslator pT = new PackageTranslator(RepositoryEntryStatus.class.getPackage().getName(), locale);
				title = "[" + pT.translate("title.prefix.closed") + "] ".concat(title);
			}
			return title;
		}
	}

	/**
	 *
	 * Description:

	 * TableDataModel implementation for the bookmark manual sorting.
	 *
	 *

	 * Initial Date:  23.11.2007

	 * @author Lavinia Dumitrescu
	 */
	private static class BookmarkManualSortingTableDataModel extends PortletDefaultTableDataModel<Bookmark> {
		private final Locale locale;

		/**
		 * @param objects
		 * @param locale
		 */
		public BookmarkManualSortingTableDataModel(List<PortletEntry<Bookmark>> objects, Locale locale) {
			super(objects, 4);
			this.locale = locale;
		}

		/**
		 * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
		 */
		public final Object getValueAt(int row, int col) {
			PortletEntry<Bookmark> entry = getObject(row);
			Bookmark bm = entry.getValue();
			switch (col) {
				case 0:
					return bm.getTitle();
				case 1:
					String desc = bm.getDescription();
					return (desc == null ? "n/a" : FilterFactory.getHtmlTagsFilter().filter(desc));
				case 2:
					String resType = bm.getDisplayrestype();
					return (resType == null ? "n/a" : ControllerFactory.translateResourceableTypeName(resType, locale));
				case 3:
					Date date = bm.getCreationDate();
					//return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getTranslator().getLocale()).format(date);
					//return date else the sorting doesn't work properly
					return date;
				default:
					return "error";
			}
		}
	}

	/**
	 *
	 * PortletEntry impl for Bookmark values.
	 *
	 *

	 * Initial Date:  10.12.2007

	 * @author Lavinia Dumitrescu
	 */
	private static class BookmarkPortletEntry implements PortletEntry<Bookmark> {
  	private final Bookmark mark;

  	public BookmarkPortletEntry(Bookmark mark) {
  		this.mark = mark;
  	}

  	public Long getKey() {
  		return mark.getKey();
  	}

  	public Bookmark getValue() {
  		return mark;
  	}
  }
}


text:
<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <!-- logger name="de.hub.cs.dbis.aeolus.queries.utils" level="TRACE"/-->
  <!-- logger name="de.hub.cs.dbis.aeolus.testUtils" level="TRACE"/-->

  <root level="INFO">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

redpajama_set_name: RedPajamaGithub


text:
/// <reference path="../_all.d.ts" />

module App.Home {
    "use strict";

    export interface IHomeController {

    }

    export class HomeController implements IHomeController {
        public static $inject = ["$scope"];

        constructor(private $scope: any) {
            this.init();
        }

        private init(): void {
            this.$scope.message = "Hello world from app";
        }
    }
}


text:
#include "ijksdl_codec_android_mediacodec.h"
#include <assert.h>

// FIXME: release SDL_AMediaCodec
sdl_amedia_status_t SDL_AMediaCodec_delete(SDL_AMediaCodec* acodec)
{
    if (!acodec)
        return SDL_AMEDIA_OK;

    assert(acodec->func_delete);
    return acodec->func_delete(acodec);
}

sdl_amedia_status_t SDL_AMediaCodec_deleteP(SDL_AMediaCodec** acodec)
{
    if (!acodec)
        return SDL_AMEDIA_OK;
    sdl_amedia_status_t ret = SDL_AMediaCodec_delete(*acodec);
    *acodec = NULL;
    return ret;
}

sdl_amedia_status_t SDL_AMediaCodec_configure(
    SDL_AMediaCodec* acodec,
    const SDL_AMediaFormat* aformat,
    ANativeWindow* surface,
    SDL_AMediaCrypto *crypto,
    uint32_t flags)
{
    assert(acodec->func_configure);
    sdl_amedia_status_t ret = acodec->func_configure(acodec, aformat, surface, crypto, flags);
    acodec->is_configured = true;
    acodec->is_started    = false;
    return ret;
}

sdl_amedia_status_t SDL_AMediaCodec_configure_surface(
    JNIEnv*env,
    SDL_AMediaCodec* acodec,
    const SDL_AMediaFormat* aformat,
    jobject android_surface,
    SDL_AMediaCrypto *crypto,
    uint32_t flags)
{
    assert(acodec->func_configure_surface);
    sdl_amedia_status_t ret = acodec->func_configure_surface(env, acodec, aformat, android_surface, crypto, flags);
    acodec->is_configured = true;
    acodec->is_started    = false;
    return ret;
}

void SDL_AMediaCodec_increaseReference(SDL_AMediaCodec *acodec)
{
    assert(acodec);
    __sync_fetch_and_add(&acodec->ref_count, 1);
}

void SDL_AMediaCodec_decreaseReference(SDL_AMediaCodec *acodec)
{
    if (!acodec)
        return;

    int ref_count = __sync_sub_and_fetch(&acodec->ref_count, 1);
    if (ref_count == 0) {
        AMCTRACE("%s(): ref=0\n", __func__);
        if (SDL_AMediaCodec_isStarted(acodec)) {
            SDL_AMediaCodec_stop(acodec);
        }
        SDL_AMediaCodec_delete(acodec);
    }
}

void SDL_AMediaCodec_decreaseReferenceP(SDL_AMediaCodec **acodec)
{
    if (!acodec)
        return;

    SDL_AMediaCodec_decreaseReference(*acodec);
    *acodec = NULL;
}

bool SDL_AMediaCodec_isConfigured(SDL_AMediaCodec *acodec)
{
    return acodec->is_configured;
}

bool SDL_AMediaCodec_isStarted(SDL_AMediaCodec *acodec)
{
    return acodec->is_started;
}

sdl_amedia_status_t SDL_AMediaCodec_start(SDL_AMediaCodec* acodec)
{
    assert(acodec->func_start);
    sdl_amedia_status_t amc_ret = acodec->func_start(acodec);
    if (amc_ret == SDL_AMEDIA_OK) {
        acodec->is_started = true;
    }
    return amc_ret;
}

sdl_amedia_status_t SDL_AMediaCodec_stop(SDL_AMediaCodec* acodec)
{
    assert(acodec->func_stop);
    acodec->is_started = false;
    return acodec->func_stop(acodec);
}

sdl_amedia_status_t SDL_AMediaCodec_flush(SDL_AMediaCodec* acodec)
{
    assert(acodec->func_flush);
    return acodec->func_flush(acodec);
}

uint8_t* SDL_AMediaCodec_getInputBuffer(SDL_AMediaCodec* acodec, size_t idx, size_t *out_size)
{
    assert(acodec->func_getInputBuffer);
    return acodec->func_getInputBuffer(acodec, idx, out_size);
}

uint8_t* SDL_AMediaCodec_getOutputBuffer(SDL_AMediaCodec* acodec, size_t idx, size_t *out_size)
{
    assert(acodec->func_getOutputBuffer);
    return acodec->func_getOutputBuffer(acodec, idx, out_size);
}

ssize_t SDL_AMediaCodec_dequeueInputBuffer(SDL_AMediaCodec* acodec, int64_t timeoutUs)
{
    assert(acodec->func_dequeueInputBuffer);
    return acodec->func_dequeueInputBuffer(acodec, timeoutUs);
}

sdl_amedia_status_t SDL_AMediaCodec_queueInputBuffer(SDL_AMediaCodec* acodec, size_t idx, off_t offset, size_t size, uint64_t time, uint32_t flags)
{
    assert(acodec->func_queueInputBuffer);
    return acodec->func_queueInputBuffer(acodec, idx, offset, size, time, flags);
}

ssize_t SDL_AMediaCodec_dequeueOutputBuffer(SDL_AMediaCodec* acodec, SDL_AMediaCodecBufferInfo *info, int64_t timeoutUs)
{
    assert(acodec->func_dequeueOutputBuffer);
    return acodec->func_dequeueOutputBuffer(acodec, info, timeoutUs);
}

SDL_AMediaFormat* SDL_AMediaCodec_getOutputFormat(SDL_AMediaCodec* acodec)
{
    assert(acodec->func_getOutputFormat);
    return acodec->func_getOutputFormat(acodec);
}

sdl_amedia_status_t SDL_AMediaCodec_releaseOutputBuffer(SDL_AMediaCodec* acodec, size_t idx, bool render)
{
    assert(acodec->func_releaseOutputBuffer);
    return acodec->func_releaseOutputBuffer(acodec, idx, render);
}

bool SDL_AMediaCodec_isInputBuffersValid(SDL_AMediaCodec* acodec)
{
    assert(acodec->func_isInputBuffersValid);
    return acodec->func_isInputBuffersValid(acodec);
}


text:
package com.takin.rpc.server.anno;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * a annotation for mark interface
 *
 *
 * @author Service Platform Architecture Team (spat@58.com)
 *
 * blog
 * website
 *
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ServiceDefine {
    public boolean defaultAll() default false;
}


text:
//
//  ChannelTableModel.java
//  xal
//
//  Created by Tom Pelaia on 12/9/08.
//  Copyright 2008 Oak Ridge National Lab. All rights reserved.
//

package xal.app.xyzcorrelator;

import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;

/** table model for displaying and editing the channels to correlate */
public class ChannelTableModel extends AbstractTableModel {
    /** serialization ID */
    private static final long serialVersionUID = 1L;
	/** column indicating the monitor enable status of the channel */
	protected static final int ENABLE_COLUMN = 0;

	/** column indicating the plotting status of the channel */
	protected static final int PLOTTING_COLUMN = 1;

	/** column for the channel ID */
	protected static final int CHANNEL_COLUMN = 2;

	/** column for the channel source name */
	protected static final int SOURCE_COLUMN = 3;

	/** main model */
	final private CorrelationModel MODEL;

	/** Primary Constructor */
	public ChannelTableModel( final CorrelationModel model )  {
		MODEL = model;
	}

	/** get the number of columns */
	public int getColumnCount() {
		return 4;
	}

	/** get the column titles */
	public String getColumnName( final int column ) {
		switch ( column ) {
			case ENABLE_COLUMN:
				return "Monitor";
			case PLOTTING_COLUMN:
				return "Plot";
			case SOURCE_COLUMN:
				return "Source";
			case CHANNEL_COLUMN:
				return "Channel";
			default:
				return "";
		}
	}

	/** get the number of rows */
	public int getRowCount() {
		return MODEL.getChannelPlaceholderCount();
	}

	/** get the column class */
	public Class<?> getColumnClass( final int column ) {
		switch ( column ) {
			case SOURCE_COLUMN: case CHANNEL_COLUMN:
				return String.class;
			case ENABLE_COLUMN: case PLOTTING_COLUMN:
				return Boolean.class;
			default:
				return super.getColumnClass( column );
		}
	}

	/** determine whether the specified cell is editable */
	public boolean isCellEditable( final int row, final int column ) {
		return column != SOURCE_COLUMN && MODEL.getChannel( row ) != null;
	}

	/** get the value for the specified cell */
	public Object getValueAt( final int row, final int column ) {
		switch ( column ) {
			case SOURCE_COLUMN:
				return MODEL.getChannelSourceID( row );
			case CHANNEL_COLUMN:
				return MODEL.getChannelID( row );
			case ENABLE_COLUMN:
				return MODEL.isChannelEnabled( row );
			case PLOTTING_COLUMN:
				return MODEL.isChannelPlotting( row );
			default:
				return null;
		}
	}

	/** set the value for the specified cell */
	public void setValueAt( final Object value, final int row, final int column ) {
		switch( column ) {
			case CHANNEL_COLUMN:
				MODEL.setChannelPV( row, value.toString().trim() );
				break;
			case ENABLE_COLUMN:
				MODEL.setChannelEnable( row, (Boolean)value );
				break;
			case PLOTTING_COLUMN:
				MODEL.setChannelPlotting( row, (Boolean)value );
				break;
			default:
				break;
		}
	}
}