use of org.wikipediacleaner.gui.swing.pagelist.PageListWorker in project wpcleaner by WPCleaner.
the class MainWindow method actionWatchlist.
/**
* Action called when watch list button is pressed.
*/
public void actionWatchlist() {
EnumWikipedia wikipedia = getWikipedia();
if (wikipedia == null) {
return;
}
new PageListWorker(wikipedia, this, null, null, PageListWorker.Mode.WATCH_LIST, true, GT._T("Watch list")).start();
}
use of org.wikipediacleaner.gui.swing.pagelist.PageListWorker in project wpcleaner by WPCleaner.
the class MainWindow method actionMostDabLinks.
/**
* Action called when "Pages with most disambiguation links" is pressed.
*/
public void actionMostDabLinks() {
EnumWikipedia wikipedia = getWikipedia();
if (wikipedia == null) {
return;
}
WPCConfiguration configuration = wikipedia.getConfiguration();
List<String> mostDabLinks = configuration.getStringList(WPCConfigurationStringList.MOST_DAB_LINKS);
if ((mostDabLinks == null) || (mostDabLinks.isEmpty())) {
Utilities.displayMessageForMissingConfiguration(getParentComponent(), WPCConfigurationStringList.MOST_DAB_LINKS.getAttributeName());
return;
}
new PageListWorker(wikipedia, this, null, mostDabLinks, PageListWorker.Mode.CATEGORY_MEMBERS_ARTICLES, false, GT._T("Pages with many disambiguation links")).start();
}
use of org.wikipediacleaner.gui.swing.pagelist.PageListWorker in project wpcleaner by WPCleaner.
the class MainWindow method actionSearchTitles.
/**
* Action called when Search Titles button is pressed.
*/
public void actionSearchTitles() {
String pageName = checkPagename(GT._T("You must input a page name"));
if (pageName == null) {
return;
}
new PageListWorker(getWikipedia(), this, null, Collections.singletonList(pageName), PageListWorker.Mode.SEARCH_TITLES, false, GT._T("Search results for {0}", pageName)).start();
}
use of org.wikipediacleaner.gui.swing.pagelist.PageListWorker in project wpcleaner by WPCleaner.
the class MainWindow method actionHelpRequestedOn.
/**
* Action called when Help Requested On is pressed.
*/
public void actionHelpRequestedOn() {
EnumWikipedia wikipedia = getWikipedia();
if (wikipedia == null) {
return;
}
WPCConfiguration configuration = wikipedia.getConfiguration();
List<Page> templates = configuration.getTemplatesForHelpRequested();
if ((templates == null) || (templates.isEmpty())) {
Utilities.displayMessageForMissingConfiguration(getParentComponent(), WPCConfigurationStringList.TEMPLATES_FOR_HELP_REQUESTED.getAttributeName());
return;
}
List<String> pageNames = new ArrayList<>();
for (Page template : templates) {
pageNames.add(template.getTitle());
}
new PageListWorker(wikipedia, this, null, pageNames, PageListWorker.Mode.EMBEDDED_IN, false, GT._T("Help requested on...")).start();
}
use of org.wikipediacleaner.gui.swing.pagelist.PageListWorker in project wpcleaner by WPCleaner.
the class MainWindow method actionInternalLinks.
/**
* Action called when Internal Links button is pressed.
*
* @param mode Mode.
*/
public void actionInternalLinks(String mode) {
String pageName = checkPagename(GT._T("You must input a page name for retrieving the list of internal links"));
if ((pageName == null) || (mode == null)) {
return;
}
Configuration config = Configuration.getConfiguration();
config.setString(null, ConfigurationValueString.PAGE_NAME, pageName);
config.save();
new PageListWorker(getWikipedia(), this, DataManager.getPage(getWikipedia(), pageName, null, null, null), Collections.singletonList(pageName), PageListWorker.Mode.valueOf(mode), false, GT._T("Internal links in {0}", pageName)).start();
}
Aggregations