本文整理汇总了Java中com.intellij.tasks.trello.model.TrelloList类的典型用法代码示例。如果您正苦于以下问题:Java TrelloList类的具体用法?Java TrelloList怎么用?Java TrelloList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TrelloList类属于com.intellij.tasks.trello.model包,在下文中一共展示了TrelloList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAvailableTaskStates
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
@Override
public Set<CustomTaskState> getAvailableTaskStates(@NotNull Task task) throws Exception {
final TrelloCard card = fetchCardById(task.getId());
if (card != null) {
final List<TrelloList> lists = fetchBoardLists(card.getIdBoard());
final Set<CustomTaskState> result = new HashSet<CustomTaskState>();
for (TrelloList list : lists) {
if (!list.getId().equals(card.getIdList())) {
result.add(new CustomTaskState(list.getId(), list.getName()));
}
}
return result;
}
return Collections.emptySet();
}
示例2: customize
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Override
public void customize(JList list, TrelloList trelloList, int index, boolean selected, boolean hasFocus) {
if (trelloList == null) {
setText(myNullDescription);
return;
}
String text = trelloList.getName();
if (trelloList.isClosed() && trelloList.isMoved()) {
text += " (archived,moved)";
}
else if (trelloList.isMoved()) {
text += " (moved)";
}
else if (trelloList.isClosed()) {
text += " (archived)";
}
setText(text);
}
示例3: fetchListById
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
public TrelloList fetchListById(@NotNull String id) throws Exception {
final URIBuilder url = new URIBuilder(getRestApiUrl("lists", id))
.addParameter("fields", TrelloList.REQUIRED_FIELDS);
try {
return ObjectUtils.assertNotNull(makeRequestAndDeserializeJsonResponse(url.build(), TrelloList.class));
}
catch (Exception e) {
LOG.warn("Error while fetching initial list info" + id, e);
throw e;
}
}
示例4: fetchBoardLists
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
public List<TrelloList> fetchBoardLists() throws Exception {
if (myCurrentBoard == null || myCurrentBoard == UNSPECIFIED_BOARD) {
throw new IllegalStateException("Board not set");
}
return fetchBoardLists(myCurrentBoard.getId());
}
示例5: fetchListById
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Nullable
private TrelloList fetchListById(String id) {
String url = "/lists/" + id;
try {
return makeRequestAndDeserializeJsonResponse(url, TrelloList.class);
}
catch (Exception e) {
LOG.warn("Error while fetching initial list info with id = " + id, e);
}
return null;
}
示例6: fetchBoardLists
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
public List<TrelloList> fetchBoardLists() throws Exception {
if (myCurrentBoard == null) {
throw new IllegalStateException("Board not set");
}
String url = TrelloUtil.TRELLO_API_BASE_URL + "/boards/" + myCurrentBoard.getId() + "/lists";
return makeRequestAndDeserializeJsonResponse(url, TrelloUtil.LIST_OF_LISTS_TYPE);
}
示例7: updateUI
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Override
protected void updateUI(List<TrelloList> lists) {
myListComboBox.setModel(new DefaultComboBoxModel(lists.toArray()));
myListComboBox.insertItemAt(UNSPECIFIED_LIST, 0);
// explicitly add moved or archived list to combobox: see IDEA-111819 for details
if (!(myList == null || myList == UNSPECIFIED_LIST) && !lists.contains(myList)) {
myListComboBox.addItem(myList);
}
myListComboBox.setSelectedItem(myList == null ? UNSPECIFIED_LIST : myList);
}
示例8: fetchListById
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
public TrelloList fetchListById(@NotNull String id) throws Exception
{
final URIBuilder url = new URIBuilder(getRestApiUrl("lists", id)).addParameter("fields", TrelloList.REQUIRED_FIELDS);
try
{
return makeRequestAndDeserializeJsonResponse(url.build(), TrelloList.class);
}
catch(Exception e)
{
LOG.warn("Error while fetching initial list info" + id, e);
throw e;
}
}
示例9: fetchBoardLists
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
public List<TrelloList> fetchBoardLists() throws Exception
{
if(myCurrentBoard == null || myCurrentBoard == UNSPECIFIED_BOARD)
{
throw new IllegalStateException("Board not set");
}
final URIBuilder url = new URIBuilder(getRestApiUrl("boards", myCurrentBoard.getId(), "lists")).addParameter("fields",
TrelloList.REQUIRED_FIELDS);
return makeRequestAndDeserializeJsonResponse(url.build(), TrelloUtil.LIST_OF_LISTS_TYPE);
}
示例10: fetch
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@NotNull
@Override
protected List<TrelloList> fetch(@NotNull ProgressIndicator indicator) throws Exception {
return myRepository.fetchBoardLists();
}
示例11: getExtraItem
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Nullable
@Override
public TrelloList getExtraItem() {
return TrelloRepository.UNSPECIFIED_LIST;
}
示例12: getSelectedItem
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Nullable
@Override
public TrelloList getSelectedItem() {
return myRepository.getCurrentList();
}
示例13: getCurrentList
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
@Nullable
public TrelloList getCurrentList() {
return myCurrentList;
}
示例14: setCurrentList
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
public void setCurrentList(@Nullable TrelloList list) {
myCurrentList = list != null && list.getId().equals(UNSPECIFIED_LIST.getId()) ? UNSPECIFIED_LIST : list;
}
示例15: fillListsComboBox
import com.intellij.tasks.trello.model.TrelloList; //导入依赖的package包/类
private void fillListsComboBox(List<TrelloList> lists) {
myListComboBox.setModel(new DefaultComboBoxModel(lists.toArray()));
myListComboBox.insertItemAt(UNSPECIFIED_LIST, 0);
}