id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
11,700 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java | AbstractObjectTable.onDoubleClick | protected void onDoubleClick() {
// Dispatch this to the doubleClickHandler, if any
if (doubleClickHandler != null) {
boolean okToExecute = true;
if (doubleClickHandler instanceof GuardedActionCommandExecutor) {
okToExecute = ((GuardedActionCommandExecutor) doubleClickHandler)
.isEnabled();
}
... | java | protected void onDoubleClick() {
// Dispatch this to the doubleClickHandler, if any
if (doubleClickHandler != null) {
boolean okToExecute = true;
if (doubleClickHandler instanceof GuardedActionCommandExecutor) {
okToExecute = ((GuardedActionCommandExecutor) doubleClickHandler)
.isEnabled();
}
... | [
"protected",
"void",
"onDoubleClick",
"(",
")",
"{",
"// Dispatch this to the doubleClickHandler, if any",
"if",
"(",
"doubleClickHandler",
"!=",
"null",
")",
"{",
"boolean",
"okToExecute",
"=",
"true",
";",
"if",
"(",
"doubleClickHandler",
"instanceof",
"GuardedActionC... | Handle a double click on a row of the table. The row will already be
selected. | [
"Handle",
"a",
"double",
"click",
"on",
"a",
"row",
"of",
"the",
"table",
".",
"The",
"row",
"will",
"already",
"be",
"selected",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java#L440-L453 |
11,701 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java | AbstractObjectTable.createTableModel | protected GlazedTableModel createTableModel(EventList eventList) {
return new GlazedTableModel(eventList, getColumnPropertyNames(),
modelId) {
protected TableFormat createTableFormat() {
return new DefaultAdvancedTableFormat();
}
};
} | java | protected GlazedTableModel createTableModel(EventList eventList) {
return new GlazedTableModel(eventList, getColumnPropertyNames(),
modelId) {
protected TableFormat createTableFormat() {
return new DefaultAdvancedTableFormat();
}
};
} | [
"protected",
"GlazedTableModel",
"createTableModel",
"(",
"EventList",
"eventList",
")",
"{",
"return",
"new",
"GlazedTableModel",
"(",
"eventList",
",",
"getColumnPropertyNames",
"(",
")",
",",
"modelId",
")",
"{",
"protected",
"TableFormat",
"createTableFormat",
"("... | Construct the table model for this table. The default implementation of
this creates a GlazedTableModel using an Advanced format.
@param eventList
on which to build the model
@return table model | [
"Construct",
"the",
"table",
"model",
"for",
"this",
"table",
".",
"The",
"default",
"implementation",
"of",
"this",
"creates",
"a",
"GlazedTableModel",
"using",
"an",
"Advanced",
"format",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java#L463-L470 |
11,702 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java | AbstractObjectTable.updateStatusBar | protected void updateStatusBar() {
if (statusBar != null) {
int all = getBaseEventList().size();
int showing = getFinalEventList().size();
String msg;
if (all == showing) {
String[] keys = new String[] {
modelId + "." + SHOWINGALL_MSG_KEY, SHOWINGALL_MSG_KEY };
msg = getApplicationConfig().m... | java | protected void updateStatusBar() {
if (statusBar != null) {
int all = getBaseEventList().size();
int showing = getFinalEventList().size();
String msg;
if (all == showing) {
String[] keys = new String[] {
modelId + "." + SHOWINGALL_MSG_KEY, SHOWINGALL_MSG_KEY };
msg = getApplicationConfig().m... | [
"protected",
"void",
"updateStatusBar",
"(",
")",
"{",
"if",
"(",
"statusBar",
"!=",
"null",
")",
"{",
"int",
"all",
"=",
"getBaseEventList",
"(",
")",
".",
"size",
"(",
")",
";",
"int",
"showing",
"=",
"getFinalEventList",
"(",
")",
".",
"size",
"(",
... | Update the status bar with the current display counts. | [
"Update",
"the",
"status",
"bar",
"with",
"the",
"current",
"display",
"counts",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java#L624-L660 |
11,703 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java | AbstractObjectTable.onApplicationEvent | public void onApplicationEvent(ApplicationEvent e) {
if (e instanceof LifecycleApplicationEvent) {
LifecycleApplicationEvent le = (LifecycleApplicationEvent) e;
if (shouldHandleEvent(e)) {
if (le.getEventType() == LifecycleApplicationEvent.CREATED) {
handleNewObject(le.getObject());
} else if (le.g... | java | public void onApplicationEvent(ApplicationEvent e) {
if (e instanceof LifecycleApplicationEvent) {
LifecycleApplicationEvent le = (LifecycleApplicationEvent) e;
if (shouldHandleEvent(e)) {
if (le.getEventType() == LifecycleApplicationEvent.CREATED) {
handleNewObject(le.getObject());
} else if (le.g... | [
"public",
"void",
"onApplicationEvent",
"(",
"ApplicationEvent",
"e",
")",
"{",
"if",
"(",
"e",
"instanceof",
"LifecycleApplicationEvent",
")",
"{",
"LifecycleApplicationEvent",
"le",
"=",
"(",
"LifecycleApplicationEvent",
")",
"e",
";",
"if",
"(",
"shouldHandleEven... | Handle an application event. This will notify us of object adds, deletes,
and modifications. Update our table model accordingly.
@param e
event to process | [
"Handle",
"an",
"application",
"event",
".",
"This",
"will",
"notify",
"us",
"of",
"object",
"adds",
"deletes",
"and",
"modifications",
".",
"Update",
"our",
"table",
"model",
"accordingly",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java#L669-L682 |
11,704 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/support/DialogPageUtils.java | DialogPageUtils.createButtonBar | public static JComponent createButtonBar(Object[] groupMembers) {
CommandGroupFactoryBean commandGroupFactoryBean = new CommandGroupFactoryBean(
null, groupMembers);
// CommandGroup dialogCommandGroup =
// CommandGroup.createCommandGroup(null,
// groupMembers);
CommandGroup dialogCommandGroup = commandGro... | java | public static JComponent createButtonBar(Object[] groupMembers) {
CommandGroupFactoryBean commandGroupFactoryBean = new CommandGroupFactoryBean(
null, groupMembers);
// CommandGroup dialogCommandGroup =
// CommandGroup.createCommandGroup(null,
// groupMembers);
CommandGroup dialogCommandGroup = commandGro... | [
"public",
"static",
"JComponent",
"createButtonBar",
"(",
"Object",
"[",
"]",
"groupMembers",
")",
"{",
"CommandGroupFactoryBean",
"commandGroupFactoryBean",
"=",
"new",
"CommandGroupFactoryBean",
"(",
"null",
",",
"groupMembers",
")",
";",
"// CommandGroup dialogCommandG... | Return a standardized row of command buttons.
@param groupMembers
@return button bar | [
"Return",
"a",
"standardized",
"row",
"of",
"command",
"buttons",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/support/DialogPageUtils.java#L115-L126 |
11,705 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/support/DialogPageUtils.java | DialogPageUtils.adaptPageCompletetoGuarded | public static void adaptPageCompletetoGuarded(DialogPage dialogPage,
Guarded guarded) {
dialogPage.addPropertyChangeListener(DialogPage.PAGE_COMPLETE_PROPERTY,
new PageCompleteAdapter(guarded));
} | java | public static void adaptPageCompletetoGuarded(DialogPage dialogPage,
Guarded guarded) {
dialogPage.addPropertyChangeListener(DialogPage.PAGE_COMPLETE_PROPERTY,
new PageCompleteAdapter(guarded));
} | [
"public",
"static",
"void",
"adaptPageCompletetoGuarded",
"(",
"DialogPage",
"dialogPage",
",",
"Guarded",
"guarded",
")",
"{",
"dialogPage",
".",
"addPropertyChangeListener",
"(",
"DialogPage",
".",
"PAGE_COMPLETE_PROPERTY",
",",
"new",
"PageCompleteAdapter",
"(",
"gua... | Create an adapter that will monitor the page complete status of the
dialog page and adapt it to operations on the provided Guarded object. If
the page is complete, then the guarded object will be enabled. If this
page is not complete, then the guarded object will be disabled.
@param dialogPage
to monitor
@param guarde... | [
"Create",
"an",
"adapter",
"that",
"will",
"monitor",
"the",
"page",
"complete",
"status",
"of",
"the",
"dialog",
"page",
"and",
"adapt",
"it",
"to",
"operations",
"on",
"the",
"provided",
"Guarded",
"object",
".",
"If",
"the",
"page",
"is",
"complete",
"t... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/dialog/support/DialogPageUtils.java#L155-L159 |
11,706 | instacount/appengine-counter | src/main/java/io/instacount/appengine/counter/CounterBuilder.java | CounterBuilder.build | public Counter build()
{
return new Counter(this.getName(), this.getDescription(), this.getNumShards(),
this.getCounterStatus(), this.getCount(), this.getIndexes(), this.getCreationDateTime());
} | java | public Counter build()
{
return new Counter(this.getName(), this.getDescription(), this.getNumShards(),
this.getCounterStatus(), this.getCount(), this.getIndexes(), this.getCreationDateTime());
} | [
"public",
"Counter",
"build",
"(",
")",
"{",
"return",
"new",
"Counter",
"(",
"this",
".",
"getName",
"(",
")",
",",
"this",
".",
"getDescription",
"(",
")",
",",
"this",
".",
"getNumShards",
"(",
")",
",",
"this",
".",
"getCounterStatus",
"(",
")",
... | Build method for constructing a new Counter.
@return | [
"Build",
"method",
"for",
"constructing",
"a",
"new",
"Counter",
"."
] | 60aa86ab28f173ec1642539926b69924b8bda238 | https://github.com/instacount/appengine-counter/blob/60aa86ab28f173ec1642539926b69924b8bda238/src/main/java/io/instacount/appengine/counter/CounterBuilder.java#L87-L91 |
11,707 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ReflectiveVisitorHelper.java | ReflectiveVisitorHelper.getMethod | private Method getMethod(Class visitorClass, Object argument) {
ClassVisitMethods visitMethods = (ClassVisitMethods) this.visitorClassVisitMethods
.get(visitorClass);
return visitMethods.getVisitMethod(argument != null ? argument
.getClass() : null);
} | java | private Method getMethod(Class visitorClass, Object argument) {
ClassVisitMethods visitMethods = (ClassVisitMethods) this.visitorClassVisitMethods
.get(visitorClass);
return visitMethods.getVisitMethod(argument != null ? argument
.getClass() : null);
} | [
"private",
"Method",
"getMethod",
"(",
"Class",
"visitorClass",
",",
"Object",
"argument",
")",
"{",
"ClassVisitMethods",
"visitMethods",
"=",
"(",
"ClassVisitMethods",
")",
"this",
".",
"visitorClassVisitMethods",
".",
"get",
"(",
"visitorClass",
")",
";",
"retur... | Determines the most appropriate visit method for the given visitor class
and argument. | [
"Determines",
"the",
"most",
"appropriate",
"visit",
"method",
"for",
"the",
"given",
"visitor",
"class",
"and",
"argument",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ReflectiveVisitorHelper.java#L114-L119 |
11,708 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedCollectionValueModel.java | BufferedCollectionValueModel.hasSameStructure | private boolean hasSameStructure() {
Object wrappedCollection = getWrappedValue();
if (wrappedCollection == null) {
return bufferedListModel.size() == 0;
}
else if (wrappedCollection instanceof Object[]) {
Object[] wrappedArray = (Object[])wrappedCollection;
... | java | private boolean hasSameStructure() {
Object wrappedCollection = getWrappedValue();
if (wrappedCollection == null) {
return bufferedListModel.size() == 0;
}
else if (wrappedCollection instanceof Object[]) {
Object[] wrappedArray = (Object[])wrappedCollection;
... | [
"private",
"boolean",
"hasSameStructure",
"(",
")",
"{",
"Object",
"wrappedCollection",
"=",
"getWrappedValue",
"(",
")",
";",
"if",
"(",
"wrappedCollection",
"==",
"null",
")",
"{",
"return",
"bufferedListModel",
".",
"size",
"(",
")",
"==",
"0",
";",
"}",
... | Checks if the structure of the buffered list model is the same as the wrapped
collection. "same structure" is defined as having the same elements in the
same order with the one exception that NULL == empty list. | [
"Checks",
"if",
"the",
"structure",
"of",
"the",
"buffered",
"list",
"model",
"is",
"the",
"same",
"as",
"the",
"wrapped",
"collection",
".",
"same",
"structure",
"is",
"defined",
"as",
"having",
"the",
"same",
"elements",
"in",
"the",
"same",
"order",
"wi... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedCollectionValueModel.java#L150-L177 |
11,709 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedCollectionValueModel.java | BufferedCollectionValueModel.updateBufferedListModel | private Object updateBufferedListModel(final Object wrappedCollection) {
if (bufferedListModel == null) {
bufferedListModel = createBufferedListModel();
bufferedListModel.addListDataListener(listChangeHandler);
setValue(bufferedListModel);
}
if (wrappedCollect... | java | private Object updateBufferedListModel(final Object wrappedCollection) {
if (bufferedListModel == null) {
bufferedListModel = createBufferedListModel();
bufferedListModel.addListDataListener(listChangeHandler);
setValue(bufferedListModel);
}
if (wrappedCollect... | [
"private",
"Object",
"updateBufferedListModel",
"(",
"final",
"Object",
"wrappedCollection",
")",
"{",
"if",
"(",
"bufferedListModel",
"==",
"null",
")",
"{",
"bufferedListModel",
"=",
"createBufferedListModel",
"(",
")",
";",
"bufferedListModel",
".",
"addListDataLis... | Gets the list value associated with this value model, creating a list
model buffer containing its contents, suitable for manipulation.
@return The list model buffer | [
"Gets",
"the",
"list",
"value",
"associated",
"with",
"this",
"value",
"model",
"creating",
"a",
"list",
"model",
"buffer",
"containing",
"its",
"contents",
"suitable",
"for",
"manipulation",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedCollectionValueModel.java#L237-L265 |
11,710 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/support/ApplicationLauncher.java | ApplicationLauncher.loadStartupContext | private ApplicationContext loadStartupContext(Class<? extends SplashScreenConfig> startupConfig) {
if(startupConfig == null)
return null;
logger.info("Loading startup context from class ("
+ startupConfig.getName()
+ ")");
return new Annotation... | java | private ApplicationContext loadStartupContext(Class<? extends SplashScreenConfig> startupConfig) {
if(startupConfig == null)
return null;
logger.info("Loading startup context from class ("
+ startupConfig.getName()
+ ")");
return new Annotation... | [
"private",
"ApplicationContext",
"loadStartupContext",
"(",
"Class",
"<",
"?",
"extends",
"SplashScreenConfig",
">",
"startupConfig",
")",
"{",
"if",
"(",
"startupConfig",
"==",
"null",
")",
"return",
"null",
";",
"logger",
".",
"info",
"(",
"\"Loading startup con... | Returns an application context loaded from the bean definition file at
the given classpath-relative location.
@return An application context loaded from the given location, or null if
{@code startupContextPath} is null or empty. | [
"Returns",
"an",
"application",
"context",
"loaded",
"from",
"the",
"bean",
"definition",
"file",
"at",
"the",
"given",
"classpath",
"-",
"relative",
"location",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/support/ApplicationLauncher.java#L225-L232 |
11,711 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java | EditableComboBoxAutoCompletion.keyReleased | public void keyReleased(KeyEvent e) {
char ch = e.getKeyChar();
if (ch == KeyEvent.CHAR_UNDEFINED || Character.isISOControl(ch))
return;
int pos = editor.getCaretPosition();
String str = editor.getText();
if (str.length() == 0)
return;
boolean mat... | java | public void keyReleased(KeyEvent e) {
char ch = e.getKeyChar();
if (ch == KeyEvent.CHAR_UNDEFINED || Character.isISOControl(ch))
return;
int pos = editor.getCaretPosition();
String str = editor.getText();
if (str.length() == 0)
return;
boolean mat... | [
"public",
"void",
"keyReleased",
"(",
"KeyEvent",
"e",
")",
"{",
"char",
"ch",
"=",
"e",
".",
"getKeyChar",
"(",
")",
";",
"if",
"(",
"ch",
"==",
"KeyEvent",
".",
"CHAR_UNDEFINED",
"||",
"Character",
".",
"isISOControl",
"(",
"ch",
")",
")",
"return",
... | Handle a key release event. See if what they've type so far matches anything in the
selectable items list. If so, then show the popup and select the item. If not, then
hide the popup.
@param e key event | [
"Handle",
"a",
"key",
"release",
"event",
".",
"See",
"if",
"what",
"they",
"ve",
"type",
"so",
"far",
"matches",
"anything",
"in",
"the",
"selectable",
"items",
"list",
".",
"If",
"so",
"then",
"show",
"the",
"popup",
"and",
"select",
"the",
"item",
"... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java#L59-L89 |
11,712 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java | EditableComboBoxAutoCompletion.startsWithIgnoreCase | private boolean startsWithIgnoreCase(String str1, String str2) {
return str1 != null && str2 != null && str1.toUpperCase().startsWith(str2.toUpperCase());
} | java | private boolean startsWithIgnoreCase(String str1, String str2) {
return str1 != null && str2 != null && str1.toUpperCase().startsWith(str2.toUpperCase());
} | [
"private",
"boolean",
"startsWithIgnoreCase",
"(",
"String",
"str1",
",",
"String",
"str2",
")",
"{",
"return",
"str1",
"!=",
"null",
"&&",
"str2",
"!=",
"null",
"&&",
"str1",
".",
"toUpperCase",
"(",
")",
".",
"startsWith",
"(",
"str2",
".",
"toUpperCase"... | See if one string begins with another, ignoring case.
@param str1 The string to test
@param str2 The prefix to test for
@return true if str1 starts with str2, ingnoring case | [
"See",
"if",
"one",
"string",
"begins",
"with",
"another",
"ignoring",
"case",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java#L98-L100 |
11,713 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java | EditableComboBoxAutoCompletion.highlightText | private void highlightText(int start) {
editor.setCaretPosition(editor.getText().length());
editor.moveCaretPosition(start);
} | java | private void highlightText(int start) {
editor.setCaretPosition(editor.getText().length());
editor.moveCaretPosition(start);
} | [
"private",
"void",
"highlightText",
"(",
"int",
"start",
")",
"{",
"editor",
".",
"setCaretPosition",
"(",
"editor",
".",
"getText",
"(",
")",
".",
"length",
"(",
")",
")",
";",
"editor",
".",
"moveCaretPosition",
"(",
"start",
")",
";",
"}"
] | Highlight the text from the given start location to the end of the text.
@param start Starting location to highlight | [
"Highlight",
"the",
"text",
"from",
"the",
"given",
"start",
"location",
"to",
"the",
"end",
"of",
"the",
"text",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/list/EditableComboBoxAutoCompletion.java#L107-L110 |
11,714 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/list/ListMultipleSelectionGuard.java | ListMultipleSelectionGuard.shouldEnable | protected boolean shouldEnable( int[] selected ) {
return selected != null && selected.length >= 1 && (requiredCount == -1 || requiredCount == selected.length);
} | java | protected boolean shouldEnable( int[] selected ) {
return selected != null && selected.length >= 1 && (requiredCount == -1 || requiredCount == selected.length);
} | [
"protected",
"boolean",
"shouldEnable",
"(",
"int",
"[",
"]",
"selected",
")",
"{",
"return",
"selected",
"!=",
"null",
"&&",
"selected",
".",
"length",
">=",
"1",
"&&",
"(",
"requiredCount",
"==",
"-",
"1",
"||",
"requiredCount",
"==",
"selected",
".",
... | Determine if the guarded object should be enabled based on the contents
of the current selection model value.
@param selected The array of selected rows
@return boolean true if the guarded object should be enabled | [
"Determine",
"if",
"the",
"guarded",
"object",
"should",
"be",
"enabled",
"based",
"on",
"the",
"contents",
"of",
"the",
"current",
"selection",
"model",
"value",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/list/ListMultipleSelectionGuard.java#L64-L66 |
11,715 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/support/PropertyChangeSupportUtils.java | PropertyChangeSupportUtils.getNamedPCLAdder | private static Method getNamedPCLAdder(Class beanClass) {
try {
return beanClass.getMethod("addPropertyChangeListener", NAMED_PCL_PARAMS);
}
catch (NoSuchMethodException e) {
return null;
}
} | java | private static Method getNamedPCLAdder(Class beanClass) {
try {
return beanClass.getMethod("addPropertyChangeListener", NAMED_PCL_PARAMS);
}
catch (NoSuchMethodException e) {
return null;
}
} | [
"private",
"static",
"Method",
"getNamedPCLAdder",
"(",
"Class",
"beanClass",
")",
"{",
"try",
"{",
"return",
"beanClass",
".",
"getMethod",
"(",
"\"addPropertyChangeListener\"",
",",
"NAMED_PCL_PARAMS",
")",
";",
"}",
"catch",
"(",
"NoSuchMethodException",
"e",
"... | Looks up and returns the method that adds a PropertyChangeListener
for a specified property name to instances of the given class.
@param beanClass the class that provides the adder method
@return the method that adds the PropertyChangeListeners | [
"Looks",
"up",
"and",
"returns",
"the",
"method",
"that",
"adds",
"a",
"PropertyChangeListener",
"for",
"a",
"specified",
"property",
"name",
"to",
"instances",
"of",
"the",
"given",
"class",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/support/PropertyChangeSupportUtils.java#L154-L161 |
11,716 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java | GuiStandardUtils.createCommandButtonColumn | public static JComponent createCommandButtonColumn(JButton[] buttons) {
ButtonStackBuilder builder = new ButtonStackBuilder();
for (int i = 0; i < buttons.length; i++) {
if (i > 0) {
builder.addRelatedGap();
}
builder.addGridded(buttons[i]);
}... | java | public static JComponent createCommandButtonColumn(JButton[] buttons) {
ButtonStackBuilder builder = new ButtonStackBuilder();
for (int i = 0; i < buttons.length; i++) {
if (i > 0) {
builder.addRelatedGap();
}
builder.addGridded(buttons[i]);
}... | [
"public",
"static",
"JComponent",
"createCommandButtonColumn",
"(",
"JButton",
"[",
"]",
"buttons",
")",
"{",
"ButtonStackBuilder",
"builder",
"=",
"new",
"ButtonStackBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"buttons",
".",
... | Make a vertical row of buttons of equal size, whch are equally spaced,
and aligned on the right.
<P>
The returned component has border spacing only on the left (of the size
recommended by the Look and Feel Design Guidelines). All other spacing
must be applied elsewhere ; usually, this will only mean that the
dialog's ... | [
"Make",
"a",
"vertical",
"row",
"of",
"buttons",
"of",
"equal",
"size",
"whch",
"are",
"equally",
"spaced",
"and",
"aligned",
"on",
"the",
"right",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L138-L148 |
11,717 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java | GuiStandardUtils.createStandardTextArea | public static JTextArea createStandardTextArea(String text) {
JTextArea result = new JTextArea(text);
return configureStandardTextArea(result);
} | java | public static JTextArea createStandardTextArea(String text) {
JTextArea result = new JTextArea(text);
return configureStandardTextArea(result);
} | [
"public",
"static",
"JTextArea",
"createStandardTextArea",
"(",
"String",
"text",
")",
"{",
"JTextArea",
"result",
"=",
"new",
"JTextArea",
"(",
"text",
")",
";",
"return",
"configureStandardTextArea",
"(",
"result",
")",
";",
"}"
] | An alternative to multi-line labels, for the presentation of several
lines of text, and for which the line breaks are determined solely by the
control.
@param text
text that does not contain newline characters or html.
@return <code>JTextArea</code> which is not editable, has improved
spacing over the supplied default... | [
"An",
"alternative",
"to",
"multi",
"-",
"line",
"labels",
"for",
"the",
"presentation",
"of",
"several",
"lines",
"of",
"text",
"and",
"for",
"which",
"the",
"line",
"breaks",
"are",
"determined",
"solely",
"by",
"the",
"control",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L202-L205 |
11,718 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java | GuiStandardUtils.truncateLabelIfLong | public static void truncateLabelIfLong(JLabel label) {
String originalText = label.getText();
if (originalText.length() > UIConstants.MAX_LABEL_LENGTH) {
label.setToolTipText(originalText);
String truncatedText = originalText.substring(0, UIConstants.MAX_LABEL_LENGTH) + "...";
... | java | public static void truncateLabelIfLong(JLabel label) {
String originalText = label.getText();
if (originalText.length() > UIConstants.MAX_LABEL_LENGTH) {
label.setToolTipText(originalText);
String truncatedText = originalText.substring(0, UIConstants.MAX_LABEL_LENGTH) + "...";
... | [
"public",
"static",
"void",
"truncateLabelIfLong",
"(",
"JLabel",
"label",
")",
"{",
"String",
"originalText",
"=",
"label",
".",
"getText",
"(",
")",
";",
"if",
"(",
"originalText",
".",
"length",
"(",
")",
">",
"UIConstants",
".",
"MAX_LABEL_LENGTH",
")",
... | If aLabel has text which is longer than MAX_LABEL_LENGTH, then truncate
the label text and place an ellipsis at the end; the original text is
placed in a tooltip.
This is particularly useful for displaying file names, whose length can
vary widely between deployments.
@param label
The label to truncate if length() > M... | [
"If",
"aLabel",
"has",
"text",
"which",
"is",
"longer",
"than",
"MAX_LABEL_LENGTH",
"then",
"truncate",
"the",
"label",
"text",
"and",
"place",
"an",
"ellipsis",
"at",
"the",
"end",
";",
"the",
"original",
"text",
"is",
"placed",
"in",
"a",
"tooltip",
"."
... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L244-L251 |
11,719 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java | GuiStandardUtils.createDebugBorder | public static void createDebugBorder(JComponent c, Color color) {
if (color == null) {
color = Color.BLACK;
}
c.setBorder(BorderFactory.createLineBorder(color));
} | java | public static void createDebugBorder(JComponent c, Color color) {
if (color == null) {
color = Color.BLACK;
}
c.setBorder(BorderFactory.createLineBorder(color));
} | [
"public",
"static",
"void",
"createDebugBorder",
"(",
"JComponent",
"c",
",",
"Color",
"color",
")",
"{",
"if",
"(",
"color",
"==",
"null",
")",
"{",
"color",
"=",
"Color",
".",
"BLACK",
";",
"}",
"c",
".",
"setBorder",
"(",
"BorderFactory",
".",
"crea... | Useful debug function to place a colored, line border around a component
for layout management debugging.
@param c
the component
@param color
the border color | [
"Useful",
"debug",
"function",
"to",
"place",
"a",
"colored",
"line",
"border",
"around",
"a",
"component",
"for",
"layout",
"management",
"debugging",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L289-L294 |
11,720 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java | GridBagLayoutBuilder.append | public GridBagLayoutBuilder append(Component component, int colSpan, int rowSpan) {
return append(component, colSpan, rowSpan, 0.0, 0.0);
} | java | public GridBagLayoutBuilder append(Component component, int colSpan, int rowSpan) {
return append(component, colSpan, rowSpan, 0.0, 0.0);
} | [
"public",
"GridBagLayoutBuilder",
"append",
"(",
"Component",
"component",
",",
"int",
"colSpan",
",",
"int",
"rowSpan",
")",
"{",
"return",
"append",
"(",
"component",
",",
"colSpan",
",",
"rowSpan",
",",
"0.0",
",",
"0.0",
")",
";",
"}"
] | Appends the given component to the end of the current line, using the
default insets and no expansion
@param component the component to add to the current line
@param colSpan the number of columns to span
@param rowSpan the number of rows to span
@return "this" to make it easier to string together append calls | [
"Appends",
"the",
"given",
"component",
"to",
"the",
"end",
"of",
"the",
"current",
"line",
"using",
"the",
"default",
"insets",
"and",
"no",
"expansion"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L145-L147 |
11,721 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java | GridBagLayoutBuilder.appendLabel | public GridBagLayoutBuilder appendLabel(JLabel label, int colSpan) {
return append(label, colSpan, 1, false, false);
} | java | public GridBagLayoutBuilder appendLabel(JLabel label, int colSpan) {
return append(label, colSpan, 1, false, false);
} | [
"public",
"GridBagLayoutBuilder",
"appendLabel",
"(",
"JLabel",
"label",
",",
"int",
"colSpan",
")",
"{",
"return",
"append",
"(",
"label",
",",
"colSpan",
",",
"1",
",",
"false",
",",
"false",
")",
";",
"}"
] | Appends the given label to the end of the current line. The label does
not "grow."
@param label the label to append
@param colSpan the number of columns to span
@return "this" to make it easier to string together append calls | [
"Appends",
"the",
"given",
"label",
"to",
"the",
"end",
"of",
"the",
"current",
"line",
".",
"The",
"label",
"does",
"not",
"grow",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L471-L473 |
11,722 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java | GridBagLayoutBuilder.appendField | public GridBagLayoutBuilder appendField(Component component, int colSpan) {
return append(component, colSpan, 1, true, false);
} | java | public GridBagLayoutBuilder appendField(Component component, int colSpan) {
return append(component, colSpan, 1, true, false);
} | [
"public",
"GridBagLayoutBuilder",
"appendField",
"(",
"Component",
"component",
",",
"int",
"colSpan",
")",
"{",
"return",
"append",
"(",
"component",
",",
"colSpan",
",",
"1",
",",
"true",
",",
"false",
")",
";",
"}"
] | Appends the given component to the end of the current line. The component
will "grow" horizontally as space allows.
@param component the item to append
@param colSpan the number of columns to span
@return "this" to make it easier to string together append calls | [
"Appends",
"the",
"given",
"component",
"to",
"the",
"end",
"of",
"the",
"current",
"line",
".",
"The",
"component",
"will",
"grow",
"horizontally",
"as",
"space",
"allows",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L562-L564 |
11,723 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.fire | public void fire(String methodName, Object arg) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, new Object[] { arg });
}
} | java | public void fire(String methodName, Object arg) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, new Object[] { arg });
}
} | [
"public",
"void",
"fire",
"(",
"String",
"methodName",
",",
"Object",
"arg",
")",
"{",
"if",
"(",
"listeners",
"!=",
"EMPTY_OBJECT_ARRAY",
")",
"{",
"fireEventByReflection",
"(",
"methodName",
",",
"new",
"Object",
"[",
"]",
"{",
"arg",
"}",
")",
";",
"}... | Invokes the method with the given name and a single parameter on each of the listeners
registered with this list.
@param methodName the name of the method to invoke.
@param arg the single argument to pass to each invocation.
@throws IllegalArgumentException if no method with the given name and a single formal
paramet... | [
"Invokes",
"the",
"method",
"with",
"the",
"given",
"name",
"and",
"a",
"single",
"parameter",
"on",
"each",
"of",
"the",
"listeners",
"registered",
"with",
"this",
"list",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L233-L237 |
11,724 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.fire | public void fire(String methodName, Object arg1, Object arg2) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, new Object[] { arg1, arg2 });
}
} | java | public void fire(String methodName, Object arg1, Object arg2) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, new Object[] { arg1, arg2 });
}
} | [
"public",
"void",
"fire",
"(",
"String",
"methodName",
",",
"Object",
"arg1",
",",
"Object",
"arg2",
")",
"{",
"if",
"(",
"listeners",
"!=",
"EMPTY_OBJECT_ARRAY",
")",
"{",
"fireEventByReflection",
"(",
"methodName",
",",
"new",
"Object",
"[",
"]",
"{",
"a... | Invokes the method with the given name and two parameters on each of the listeners
registered with this list.
@param methodName the name of the method to invoke.
@param arg1 the first argument to pass to each invocation.
@param arg2 the second argument to pass to each invocation.
@throws IllegalArgumentException if n... | [
"Invokes",
"the",
"method",
"with",
"the",
"given",
"name",
"and",
"two",
"parameters",
"on",
"each",
"of",
"the",
"listeners",
"registered",
"with",
"this",
"list",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L250-L254 |
11,725 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.fire | public void fire(String methodName, Object[] args) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, args);
}
} | java | public void fire(String methodName, Object[] args) {
if (listeners != EMPTY_OBJECT_ARRAY) {
fireEventByReflection(methodName, args);
}
} | [
"public",
"void",
"fire",
"(",
"String",
"methodName",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"listeners",
"!=",
"EMPTY_OBJECT_ARRAY",
")",
"{",
"fireEventByReflection",
"(",
"methodName",
",",
"args",
")",
";",
"}",
"}"
] | Invokes the method with the given name and number of formal parameters on each of the
listeners registered with this list.
@param methodName the name of the method to invoke.
@param args an array of arguments to pass to each invocation.
@throws IllegalArgumentException if no method with the given name and number of f... | [
"Invokes",
"the",
"method",
"with",
"the",
"given",
"name",
"and",
"number",
"of",
"formal",
"parameters",
"on",
"each",
"of",
"the",
"listeners",
"registered",
"with",
"this",
"list",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L266-L270 |
11,726 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.addAll | public boolean addAll(Object[] listenersToAdd) {
if (listenersToAdd == null) {
return false;
}
boolean changed = false;
for (int i = 0; i < listenersToAdd.length; i++) {
if (add(listenersToAdd[i])) {
changed = true;
}
}
return changed;
} | java | public boolean addAll(Object[] listenersToAdd) {
if (listenersToAdd == null) {
return false;
}
boolean changed = false;
for (int i = 0; i < listenersToAdd.length; i++) {
if (add(listenersToAdd[i])) {
changed = true;
}
}
return changed;
} | [
"public",
"boolean",
"addAll",
"(",
"Object",
"[",
"]",
"listenersToAdd",
")",
"{",
"if",
"(",
"listenersToAdd",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"changed",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",... | Adds all the given listeners to the list of registered listeners. If any of the elements in
the array are null or are listeners that are already registered, they will not be registered
again.
@param listenersToAdd The collection of listeners to be added. May be null.
@return true if the list of registered listeners c... | [
"Adds",
"all",
"the",
"given",
"listeners",
"to",
"the",
"list",
"of",
"registered",
"listeners",
".",
"If",
"any",
"of",
"the",
"elements",
"in",
"the",
"array",
"are",
"null",
"or",
"are",
"listeners",
"that",
"are",
"already",
"registered",
"they",
"wil... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L322-L333 |
11,727 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.fireEventByReflection | private void fireEventByReflection(String methodName, Object[] eventArgs) {
Method eventMethod = (Method)methodCache.get(new MethodCacheKey(listenerClass, methodName, eventArgs.length));
Object[] listenersCopy = listeners;
for (int i = 0; i < listenersCopy.length; i++) {
try {
eventMethod.invoke(listenersC... | java | private void fireEventByReflection(String methodName, Object[] eventArgs) {
Method eventMethod = (Method)methodCache.get(new MethodCacheKey(listenerClass, methodName, eventArgs.length));
Object[] listenersCopy = listeners;
for (int i = 0; i < listenersCopy.length; i++) {
try {
eventMethod.invoke(listenersC... | [
"private",
"void",
"fireEventByReflection",
"(",
"String",
"methodName",
",",
"Object",
"[",
"]",
"eventArgs",
")",
"{",
"Method",
"eventMethod",
"=",
"(",
"Method",
")",
"methodCache",
".",
"get",
"(",
"new",
"MethodCacheKey",
"(",
"listenerClass",
",",
"meth... | Invokes the method with the given name on each of the listeners registered with this list
helper. The given arguments are passed to each method invocation.
@param methodName The name of the method to be invoked on the listeners.
@param eventArgs The arguments that will be passed to each method invocation. The number
o... | [
"Invokes",
"the",
"method",
"with",
"the",
"given",
"name",
"on",
"each",
"of",
"the",
"listeners",
"registered",
"with",
"this",
"list",
"helper",
".",
"The",
"given",
"arguments",
"are",
"passed",
"to",
"each",
"method",
"invocation",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L395-L409 |
11,728 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java | EventListenerListHelper.toArray | public Object toArray() {
if (listeners == EMPTY_OBJECT_ARRAY)
return Array.newInstance(listenerClass, 0);
Object[] listenersCopy = listeners;
Object copy = Array.newInstance(listenerClass, listenersCopy.length);
System.arraycopy(listenersCopy, 0, copy, 0, listenersCopy.length);
return copy;
} | java | public Object toArray() {
if (listeners == EMPTY_OBJECT_ARRAY)
return Array.newInstance(listenerClass, 0);
Object[] listenersCopy = listeners;
Object copy = Array.newInstance(listenerClass, listenersCopy.length);
System.arraycopy(listenersCopy, 0, copy, 0, listenersCopy.length);
return copy;
} | [
"public",
"Object",
"toArray",
"(",
")",
"{",
"if",
"(",
"listeners",
"==",
"EMPTY_OBJECT_ARRAY",
")",
"return",
"Array",
".",
"newInstance",
"(",
"listenerClass",
",",
"0",
")",
";",
"Object",
"[",
"]",
"listenersCopy",
"=",
"listeners",
";",
"Object",
"c... | Returns an object which is a copy of the collection of listeners registered with this instance.
@return A copy of the registered listeners array, never null. | [
"Returns",
"an",
"object",
"which",
"is",
"a",
"copy",
"of",
"the",
"collection",
"of",
"listeners",
"registered",
"with",
"this",
"instance",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/EventListenerListHelper.java#L502-L510 |
11,729 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/closure/support/AbstractElementGenerator.java | AbstractElementGenerator.reset | protected void reset() {
if (this.status == ProcessStatus.STOPPED || this.status == ProcessStatus.COMPLETED) {
if (this.runOnce) {
throw new UnsupportedOperationException("This process template can only safely execute once; "
+ "instantiate a new instance per request");
}
this.status = ProcessStat... | java | protected void reset() {
if (this.status == ProcessStatus.STOPPED || this.status == ProcessStatus.COMPLETED) {
if (this.runOnce) {
throw new UnsupportedOperationException("This process template can only safely execute once; "
+ "instantiate a new instance per request");
}
this.status = ProcessStat... | [
"protected",
"void",
"reset",
"(",
")",
"{",
"if",
"(",
"this",
".",
"status",
"==",
"ProcessStatus",
".",
"STOPPED",
"||",
"this",
".",
"status",
"==",
"ProcessStatus",
".",
"COMPLETED",
")",
"{",
"if",
"(",
"this",
".",
"runOnce",
")",
"{",
"throw",
... | Reset the ElementGenerator if possible.
@throws UnsupportedOperationException if this ElementGenerator was a
runOnce instance. | [
"Reset",
"the",
"ElementGenerator",
"if",
"possible",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/closure/support/AbstractElementGenerator.java#L158-L167 |
11,730 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-integrations/valkyrie-rcp-jidedocking/src/main/java/org/valkyriercp/application/docking/JidePageDescriptor.java | JidePageDescriptor.buildInitialLayout | public void buildInitialLayout(PageLayoutBuilder pageLayout) {
for (Iterator iter = _viewDescriptors.iterator(); iter.hasNext();) {
String viewDescriptorId = (String) iter.next();
pageLayout.addView(viewDescriptorId);
}
} | java | public void buildInitialLayout(PageLayoutBuilder pageLayout) {
for (Iterator iter = _viewDescriptors.iterator(); iter.hasNext();) {
String viewDescriptorId = (String) iter.next();
pageLayout.addView(viewDescriptorId);
}
} | [
"public",
"void",
"buildInitialLayout",
"(",
"PageLayoutBuilder",
"pageLayout",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"_viewDescriptors",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"String",
"viewDescriptorId",
... | Builds the initial page layout by iterating the
collection of view descriptors. | [
"Builds",
"the",
"initial",
"page",
"layout",
"by",
"iterating",
"the",
"collection",
"of",
"view",
"descriptors",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-jidedocking/src/main/java/org/valkyriercp/application/docking/JidePageDescriptor.java#L100-L105 |
11,731 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/CommitTrigger.java | CommitTrigger.commit | public void commit() {
for (Iterator i = listeners.iterator(); i.hasNext();) {
((CommitTriggerListener) i.next()).commit();
}
} | java | public void commit() {
for (Iterator i = listeners.iterator(); i.hasNext();) {
((CommitTriggerListener) i.next()).commit();
}
} | [
"public",
"void",
"commit",
"(",
")",
"{",
"for",
"(",
"Iterator",
"i",
"=",
"listeners",
".",
"iterator",
"(",
")",
";",
"i",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"(",
"(",
"CommitTriggerListener",
")",
"i",
".",
"next",
"(",
")",
")",
".",
... | Triggers a commit event. | [
"Triggers",
"a",
"commit",
"event",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/CommitTrigger.java#L43-L47 |
11,732 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/CommitTrigger.java | CommitTrigger.revert | public void revert() {
for (Iterator i = listeners.iterator(); i.hasNext();) {
((CommitTriggerListener) i.next()).revert();
}
} | java | public void revert() {
for (Iterator i = listeners.iterator(); i.hasNext();) {
((CommitTriggerListener) i.next()).revert();
}
} | [
"public",
"void",
"revert",
"(",
")",
"{",
"for",
"(",
"Iterator",
"i",
"=",
"listeners",
".",
"iterator",
"(",
")",
";",
"i",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"(",
"(",
"CommitTriggerListener",
")",
"i",
".",
"next",
"(",
")",
")",
".",
... | Triggers a revert event. | [
"Triggers",
"a",
"revert",
"event",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/CommitTrigger.java#L52-L56 |
11,733 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/DefaultCommandRegistry.java | DefaultCommandRegistry.internalSetParent | private void internalSetParent(CommandRegistry parentRegistry) {
if (!ObjectUtils.nullSafeEquals(this.parent, parentRegistry)) {
if (this.parent != null) {
this.parent.removeCommandRegistryListener(this);
}
this.parent = pare... | java | private void internalSetParent(CommandRegistry parentRegistry) {
if (!ObjectUtils.nullSafeEquals(this.parent, parentRegistry)) {
if (this.parent != null) {
this.parent.removeCommandRegistryListener(this);
}
this.parent = pare... | [
"private",
"void",
"internalSetParent",
"(",
"CommandRegistry",
"parentRegistry",
")",
"{",
"if",
"(",
"!",
"ObjectUtils",
".",
"nullSafeEquals",
"(",
"this",
".",
"parent",
",",
"parentRegistry",
")",
")",
"{",
"if",
"(",
"this",
".",
"parent",
"!=",
"null"... | This method is provided as a private helper so that it can be called by the constructor,
instead of the constructor having to call the public overridable setParent method. | [
"This",
"method",
"is",
"provided",
"as",
"a",
"private",
"helper",
"so",
"that",
"it",
"can",
"be",
"called",
"by",
"the",
"constructor",
"instead",
"of",
"the",
"constructor",
"having",
"to",
"call",
"the",
"public",
"overridable",
"setParent",
"method",
"... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/DefaultCommandRegistry.java#L83-L99 |
11,734 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/ImageViewWidget.java | ImageViewWidget.setImage | public void setImage(Resource resource)
{
ImageIcon image = null;
if (resource != null && resource.exists())
{
try
{
image = new ImageIcon(resource.getURL());
}
catch (IOException e)
{
logger.warn("Er... | java | public void setImage(Resource resource)
{
ImageIcon image = null;
if (resource != null && resource.exists())
{
try
{
image = new ImageIcon(resource.getURL());
}
catch (IOException e)
{
logger.warn("Er... | [
"public",
"void",
"setImage",
"(",
"Resource",
"resource",
")",
"{",
"ImageIcon",
"image",
"=",
"null",
";",
"if",
"(",
"resource",
"!=",
"null",
"&&",
"resource",
".",
"exists",
"(",
")",
")",
"{",
"try",
"{",
"image",
"=",
"new",
"ImageIcon",
"(",
... | Sets the image content of the widget based on a resource
@param resource
points to a image resource | [
"Sets",
"the",
"image",
"content",
"of",
"the",
"widget",
"based",
"on",
"a",
"resource"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/ImageViewWidget.java#L66-L82 |
11,735 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java | HtmlPane.setAntiAlias | public void setAntiAlias(boolean antiAlias) {
if (this.antiAlias == antiAlias) {
return;
}
this.antiAlias = antiAlias;
firePropertyChange("antiAlias", !antiAlias, antiAlias);
repaint();
} | java | public void setAntiAlias(boolean antiAlias) {
if (this.antiAlias == antiAlias) {
return;
}
this.antiAlias = antiAlias;
firePropertyChange("antiAlias", !antiAlias, antiAlias);
repaint();
} | [
"public",
"void",
"setAntiAlias",
"(",
"boolean",
"antiAlias",
")",
"{",
"if",
"(",
"this",
".",
"antiAlias",
"==",
"antiAlias",
")",
"{",
"return",
";",
"}",
"this",
".",
"antiAlias",
"=",
"antiAlias",
";",
"firePropertyChange",
"(",
"\"antiAlias\"",
",",
... | Set whether the pane should render the HTML using anti-aliasing. | [
"Set",
"whether",
"the",
"pane",
"should",
"render",
"the",
"HTML",
"using",
"anti",
"-",
"aliasing",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java#L80-L87 |
11,736 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java | HtmlPane.setAllowSelection | public void setAllowSelection(boolean allowSelection) {
if (this.allowSelection == allowSelection) {
return;
}
this.allowSelection = allowSelection;
setCaretInternal();
firePropertyChange("allowSelection", !allowSelection, allowSelection);
} | java | public void setAllowSelection(boolean allowSelection) {
if (this.allowSelection == allowSelection) {
return;
}
this.allowSelection = allowSelection;
setCaretInternal();
firePropertyChange("allowSelection", !allowSelection, allowSelection);
} | [
"public",
"void",
"setAllowSelection",
"(",
"boolean",
"allowSelection",
")",
"{",
"if",
"(",
"this",
".",
"allowSelection",
"==",
"allowSelection",
")",
"{",
"return",
";",
"}",
"this",
".",
"allowSelection",
"=",
"allowSelection",
";",
"setCaretInternal",
"(",... | Set whether or not selection should be allowed in this pane. | [
"Set",
"whether",
"or",
"not",
"selection",
"should",
"be",
"allowed",
"in",
"this",
"pane",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java#L99-L106 |
11,737 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java | HtmlPane.installLaFStyleSheet | protected void installLaFStyleSheet() {
Font defaultFont = UIManager.getFont("Button.font");
String stylesheet = "body { font-family: " + defaultFont.getName() + "; font-size: " + defaultFont.getSize()
+ "pt; }" + "a, p, li { font-family: " + defaultFont.getName() + "; font-size: "
... | java | protected void installLaFStyleSheet() {
Font defaultFont = UIManager.getFont("Button.font");
String stylesheet = "body { font-family: " + defaultFont.getName() + "; font-size: " + defaultFont.getSize()
+ "pt; }" + "a, p, li { font-family: " + defaultFont.getName() + "; font-size: "
... | [
"protected",
"void",
"installLaFStyleSheet",
"(",
")",
"{",
"Font",
"defaultFont",
"=",
"UIManager",
".",
"getFont",
"(",
"\"Button.font\"",
")",
";",
"String",
"stylesheet",
"=",
"\"body { font-family: \"",
"+",
"defaultFont",
".",
"getName",
"(",
")",
"+",
"\... | Applies the current LaF font setting to the document. | [
"Applies",
"the",
"current",
"LaF",
"font",
"setting",
"to",
"the",
"document",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/HtmlPane.java#L129-L139 |
11,738 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.add | public void add(ApplicationWindow window) {
if (activeWindow == null) // first window will be set as activeWindow
setActiveWindow(window);
if (!windows.contains(window)) {
windows.add(window);
window.setWindowManager(this);
setChanged();
notif... | java | public void add(ApplicationWindow window) {
if (activeWindow == null) // first window will be set as activeWindow
setActiveWindow(window);
if (!windows.contains(window)) {
windows.add(window);
window.setWindowManager(this);
setChanged();
notif... | [
"public",
"void",
"add",
"(",
"ApplicationWindow",
"window",
")",
"{",
"if",
"(",
"activeWindow",
"==",
"null",
")",
"// first window will be set as activeWindow",
"setActiveWindow",
"(",
"window",
")",
";",
"if",
"(",
"!",
"windows",
".",
"contains",
"(",
"wind... | Adds the given window to the set of windows managed by this window
manager. Does nothing is this window is already managed by this window
manager.
@param window
the window | [
"Adds",
"the",
"given",
"window",
"to",
"the",
"set",
"of",
"windows",
"managed",
"by",
"this",
"window",
"manager",
".",
"Does",
"nothing",
"is",
"this",
"window",
"is",
"already",
"managed",
"by",
"this",
"window",
"manager",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L80-L90 |
11,739 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.addWindowManager | private void addWindowManager(WindowManager wm) {
if (subManagers == null) {
subManagers = new ArrayList();
}
if (!subManagers.contains(wm)) {
subManagers.add(wm);
wm.parentManager = this;
}
} | java | private void addWindowManager(WindowManager wm) {
if (subManagers == null) {
subManagers = new ArrayList();
}
if (!subManagers.contains(wm)) {
subManagers.add(wm);
wm.parentManager = this;
}
} | [
"private",
"void",
"addWindowManager",
"(",
"WindowManager",
"wm",
")",
"{",
"if",
"(",
"subManagers",
"==",
"null",
")",
"{",
"subManagers",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"if",
"(",
"!",
"subManagers",
".",
"contains",
"(",
"wm",
")",
"... | Adds the given window manager to the list of window managers that have
this one as a parent.
@param wm
the child window manager | [
"Adds",
"the",
"given",
"window",
"manager",
"to",
"the",
"list",
"of",
"window",
"managers",
"that",
"have",
"this",
"one",
"as",
"a",
"parent",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L99-L107 |
11,740 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.close | public boolean close() {
List t = (List)((ArrayList)windows).clone();
Iterator e = t.iterator();
while (e.hasNext()) {
ApplicationWindow window = (ApplicationWindow)e.next();
if (!window.close()) { return false; }
}
if (subManagers != null) {
e... | java | public boolean close() {
List t = (List)((ArrayList)windows).clone();
Iterator e = t.iterator();
while (e.hasNext()) {
ApplicationWindow window = (ApplicationWindow)e.next();
if (!window.close()) { return false; }
}
if (subManagers != null) {
e... | [
"public",
"boolean",
"close",
"(",
")",
"{",
"List",
"t",
"=",
"(",
"List",
")",
"(",
"(",
"ArrayList",
")",
"windows",
")",
".",
"clone",
"(",
")",
";",
"Iterator",
"e",
"=",
"t",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"e",
".",
"hasNex... | Attempts to close all windows managed by this window manager, as well as
windows managed by any descendent window managers.
@return <code>true</code> if all windows were sucessfully closed, and
<code>false</code> if any window refused to close | [
"Attempts",
"to",
"close",
"all",
"windows",
"managed",
"by",
"this",
"window",
"manager",
"as",
"well",
"as",
"windows",
"managed",
"by",
"any",
"descendent",
"window",
"managers",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L116-L131 |
11,741 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.getWindows | public ApplicationWindow[] getWindows() {
ApplicationWindow managed[] = new ApplicationWindow[windows.size()];
windows.toArray(managed);
return managed;
} | java | public ApplicationWindow[] getWindows() {
ApplicationWindow managed[] = new ApplicationWindow[windows.size()];
windows.toArray(managed);
return managed;
} | [
"public",
"ApplicationWindow",
"[",
"]",
"getWindows",
"(",
")",
"{",
"ApplicationWindow",
"managed",
"[",
"]",
"=",
"new",
"ApplicationWindow",
"[",
"windows",
".",
"size",
"(",
")",
"]",
";",
"windows",
".",
"toArray",
"(",
"managed",
")",
";",
"return",... | Returns this window manager's set of windows.
@return a possibly empty list of window | [
"Returns",
"this",
"window",
"manager",
"s",
"set",
"of",
"windows",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L138-L142 |
11,742 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.remove | public final void remove(ApplicationWindow window) {
if (windows.contains(window)) {
windows.remove(window);
window.setWindowManager(null);
setChanged();
notifyObservers();
}
} | java | public final void remove(ApplicationWindow window) {
if (windows.contains(window)) {
windows.remove(window);
window.setWindowManager(null);
setChanged();
notifyObservers();
}
} | [
"public",
"final",
"void",
"remove",
"(",
"ApplicationWindow",
"window",
")",
"{",
"if",
"(",
"windows",
".",
"contains",
"(",
"window",
")",
")",
"{",
"windows",
".",
"remove",
"(",
"window",
")",
";",
"window",
".",
"setWindowManager",
"(",
"null",
")"... | Removes the given window from the set of windows managed by this window
manager. Does nothing is this window is not managed by this window
manager.
@param window
the window | [
"Removes",
"the",
"given",
"window",
"from",
"the",
"set",
"of",
"windows",
"managed",
"by",
"this",
"window",
"manager",
".",
"Does",
"nothing",
"is",
"this",
"window",
"is",
"not",
"managed",
"by",
"this",
"window",
"manager",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L159-L166 |
11,743 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java | WindowManager.setActiveWindow | public final void setActiveWindow(ApplicationWindow window)
{
final ApplicationWindow old = this.activeWindow;
this.activeWindow = window;
if (getParent() != null) // let things ripple up
getParent().setActiveWindow(window);
getChangeSupport().firePropertyChange("activeWi... | java | public final void setActiveWindow(ApplicationWindow window)
{
final ApplicationWindow old = this.activeWindow;
this.activeWindow = window;
if (getParent() != null) // let things ripple up
getParent().setActiveWindow(window);
getChangeSupport().firePropertyChange("activeWi... | [
"public",
"final",
"void",
"setActiveWindow",
"(",
"ApplicationWindow",
"window",
")",
"{",
"final",
"ApplicationWindow",
"old",
"=",
"this",
".",
"activeWindow",
";",
"this",
".",
"activeWindow",
"=",
"window",
";",
"if",
"(",
"getParent",
"(",
")",
"!=",
"... | Set the currently active window. When a window gets focus, it will set itself
as the current window of it's manager.
@param window | [
"Set",
"the",
"currently",
"active",
"window",
".",
"When",
"a",
"window",
"gets",
"focus",
"it",
"will",
"set",
"itself",
"as",
"the",
"current",
"window",
"of",
"it",
"s",
"manager",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/WindowManager.java#L174-L181 |
11,744 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/AbstractApplicationLifecycleAdvisor.java | AbstractApplicationLifecycleAdvisor.onPreWindowOpen | @Override
public void onPreWindowOpen(ApplicationWindowConfigurer configurer) {
configurer.setTitle(application.getName());
configurer.setImage(application.getImage());
} | java | @Override
public void onPreWindowOpen(ApplicationWindowConfigurer configurer) {
configurer.setTitle(application.getName());
configurer.setImage(application.getImage());
} | [
"@",
"Override",
"public",
"void",
"onPreWindowOpen",
"(",
"ApplicationWindowConfigurer",
"configurer",
")",
"{",
"configurer",
".",
"setTitle",
"(",
"application",
".",
"getName",
"(",
")",
")",
";",
"configurer",
".",
"setImage",
"(",
"application",
".",
"getI... | Hook called right before the application opens a window.
@param configurer | [
"Hook",
"called",
"right",
"before",
"the",
"application",
"opens",
"a",
"window",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/config/support/AbstractApplicationLifecycleAdvisor.java#L81-L85 |
11,745 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/ListListModel.java | ListListModel.set | public Object set(int index, Object element) {
Object oldObject = items.set(index, element);
if (hasChanged(oldObject, element)) {
fireContentsChanged(index);
}
return oldObject;
} | java | public Object set(int index, Object element) {
Object oldObject = items.set(index, element);
if (hasChanged(oldObject, element)) {
fireContentsChanged(index);
}
return oldObject;
} | [
"public",
"Object",
"set",
"(",
"int",
"index",
",",
"Object",
"element",
")",
"{",
"Object",
"oldObject",
"=",
"items",
".",
"set",
"(",
"index",
",",
"element",
")",
";",
"if",
"(",
"hasChanged",
"(",
"oldObject",
",",
"element",
")",
")",
"{",
"fi... | Set the value of a list element at the specified index.
@param index of element to set
@param element New element value
@return old element value | [
"Set",
"the",
"value",
"of",
"a",
"list",
"element",
"at",
"the",
"specified",
"index",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/ListListModel.java#L226-L232 |
11,746 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/ListListModel.java | ListListModel.replaceWith | public boolean replaceWith(Collection collection) {
boolean changed = false;
if (items.size() > 0) {
items.clear();
changed = true;
}
if (items.addAll(0, collection) && !changed) {
changed = true;
}
if (changed) {
fireConten... | java | public boolean replaceWith(Collection collection) {
boolean changed = false;
if (items.size() > 0) {
items.clear();
changed = true;
}
if (items.addAll(0, collection) && !changed) {
changed = true;
}
if (changed) {
fireConten... | [
"public",
"boolean",
"replaceWith",
"(",
"Collection",
"collection",
")",
"{",
"boolean",
"changed",
"=",
"false",
";",
"if",
"(",
"items",
".",
"size",
"(",
")",
">",
"0",
")",
"{",
"items",
".",
"clear",
"(",
")",
";",
"changed",
"=",
"true",
";",
... | Replace this list model's items with the contents of the provided
collection.
@param collection
The collection to replace with | [
"Replace",
"this",
"list",
"model",
"s",
"items",
"with",
"the",
"contents",
"of",
"the",
"provided",
"collection",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/ListListModel.java#L288-L301 |
11,747 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/table/glazedlists/GlazedListsSupport.java | GlazedListsSupport.makeTableFormat | public static TableFormat makeTableFormat(final TableDescription desc)
{
return new AdvancedWritableTableFormat()
{
public Class getColumnClass(int i)
{
return desc.getType(i);
}
public Comparator getColumnComparator(int i)
... | java | public static TableFormat makeTableFormat(final TableDescription desc)
{
return new AdvancedWritableTableFormat()
{
public Class getColumnClass(int i)
{
return desc.getType(i);
}
public Comparator getColumnComparator(int i)
... | [
"public",
"static",
"TableFormat",
"makeTableFormat",
"(",
"final",
"TableDescription",
"desc",
")",
"{",
"return",
"new",
"AdvancedWritableTableFormat",
"(",
")",
"{",
"public",
"Class",
"getColumnClass",
"(",
"int",
"i",
")",
"{",
"return",
"desc",
".",
"getTy... | Conversion of RCP TableDescription to GlazedLists TableFormat
@param desc
@return AdvancedWritableTableFormat | [
"Conversion",
"of",
"RCP",
"TableDescription",
"to",
"GlazedLists",
"TableFormat"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/table/glazedlists/GlazedListsSupport.java#L48-L100 |
11,748 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/validation/support/JSR303Validator.java | JSR303Validator.doValidate | protected Set<ConstraintViolation<T>> doValidate(final T object, final String property) {
if (property == null) {
final Set<ConstraintViolation<T>> ret = Sets.newHashSet();
PropertyDescriptor[] propertyDescriptors;
try {
propertyDescriptors = Introspector.getBeanInfo(object.getClass()).getPropertyDescrip... | java | protected Set<ConstraintViolation<T>> doValidate(final T object, final String property) {
if (property == null) {
final Set<ConstraintViolation<T>> ret = Sets.newHashSet();
PropertyDescriptor[] propertyDescriptors;
try {
propertyDescriptors = Introspector.getBeanInfo(object.getClass()).getPropertyDescrip... | [
"protected",
"Set",
"<",
"ConstraintViolation",
"<",
"T",
">",
">",
"doValidate",
"(",
"final",
"T",
"object",
",",
"final",
"String",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"null",
")",
"{",
"final",
"Set",
"<",
"ConstraintViolation",
"<",
"... | Validates the object through Hibernate Validator
@param object The object that needs to be validated
@param property The properties that needs to be validated
@return An array of {@link ConstraintViolation}, containing all validation
errors | [
"Validates",
"the",
"object",
"through",
"Hibernate",
"Validator"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/validation/support/JSR303Validator.java#L124-L153 |
11,749 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java | ObjectUtils.getAllDeclaredFields | public static Field[] getAllDeclaredFields(Class<?> leafClass) {
Assert.notNull(leafClass, "leafClass");
final List<Field> fields = new ArrayList<Field>(32);
ReflectionUtils.doWithFields(leafClass, new ReflectionUtils.FieldCallback() {
@Override
public void doWith(Fie... | java | public static Field[] getAllDeclaredFields(Class<?> leafClass) {
Assert.notNull(leafClass, "leafClass");
final List<Field> fields = new ArrayList<Field>(32);
ReflectionUtils.doWithFields(leafClass, new ReflectionUtils.FieldCallback() {
@Override
public void doWith(Fie... | [
"public",
"static",
"Field",
"[",
"]",
"getAllDeclaredFields",
"(",
"Class",
"<",
"?",
">",
"leafClass",
")",
"{",
"Assert",
".",
"notNull",
"(",
"leafClass",
",",
"\"leafClass\"",
")",
";",
"final",
"List",
"<",
"Field",
">",
"fields",
"=",
"new",
"Arra... | Get all declared fields on the leaf class and all superclasses. Leaf class methods are included first.
@param leafClass
the leaf class.
@return all declared fields.
@see ReflectionUtils#getAllDeclaredMethods(Class) since is the same approach as this one. | [
"Get",
"all",
"declared",
"fields",
"on",
"the",
"leaf",
"class",
"and",
"all",
"superclasses",
".",
"Leaf",
"class",
"methods",
"are",
"included",
"first",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java#L150-L166 |
11,750 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java | ObjectUtils.unwrapProxy | public static Object unwrapProxy(Object bean, Boolean recursive) {
Assert.notNull(recursive, "recursive");
Object unwrapped = bean;
// If the given object is a proxy, set the return value as the object being proxied, otherwise return the given
// object
if ((bean != null) && (... | java | public static Object unwrapProxy(Object bean, Boolean recursive) {
Assert.notNull(recursive, "recursive");
Object unwrapped = bean;
// If the given object is a proxy, set the return value as the object being proxied, otherwise return the given
// object
if ((bean != null) && (... | [
"public",
"static",
"Object",
"unwrapProxy",
"(",
"Object",
"bean",
",",
"Boolean",
"recursive",
")",
"{",
"Assert",
".",
"notNull",
"(",
"recursive",
",",
"\"recursive\"",
")",
";",
"Object",
"unwrapped",
"=",
"bean",
";",
"// If the given object is a proxy, set ... | This is a utility method for getting raw objects that may have been proxied. It is intended to be used in cases
where raw implementations are needed rather than working with interfaces which they implement.
@param bean
the potential proxy.
@param recursive
whether to procceeed recursively through nested proxies.
@retu... | [
"This",
"is",
"a",
"utility",
"method",
"for",
"getting",
"raw",
"objects",
"that",
"may",
"have",
"been",
"proxied",
".",
"It",
"is",
"intended",
"to",
"be",
"used",
"in",
"cases",
"where",
"raw",
"implementations",
"are",
"needed",
"rather",
"than",
"wor... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java#L242-L264 |
11,751 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java | ObjectUtils.mapObjectOnFormModel | public static void mapObjectOnFormModel(FormModel formModel, Object objectToMap)
{
BeanWrapper beanWrapper = new BeanWrapperImpl(objectToMap);
for (String fieldName : (Set<String>) formModel.getFieldNames())
{
try
{
formModel.getValueModel(fieldName).s... | java | public static void mapObjectOnFormModel(FormModel formModel, Object objectToMap)
{
BeanWrapper beanWrapper = new BeanWrapperImpl(objectToMap);
for (String fieldName : (Set<String>) formModel.getFieldNames())
{
try
{
formModel.getValueModel(fieldName).s... | [
"public",
"static",
"void",
"mapObjectOnFormModel",
"(",
"FormModel",
"formModel",
",",
"Object",
"objectToMap",
")",
"{",
"BeanWrapper",
"beanWrapper",
"=",
"new",
"BeanWrapperImpl",
"(",
"objectToMap",
")",
";",
"for",
"(",
"String",
"fieldName",
":",
"(",
"Se... | This method tries to map the values of the given object on the valueModels of the formModel. Instead of
setting the object as a backing object, all valueModels are processed one by one and the corresponding
property value is fetched from the objectToMap and set on that valueModel. This triggers the usual
buffering etc.... | [
"This",
"method",
"tries",
"to",
"map",
"the",
"values",
"of",
"the",
"given",
"object",
"on",
"the",
"valueModels",
"of",
"the",
"formModel",
".",
"Instead",
"of",
"setting",
"the",
"object",
"as",
"a",
"backing",
"object",
"all",
"valueModels",
"are",
"p... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java#L327-L341 |
11,752 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingApplicationPageFactory.java | VLDockingApplicationPageFactory.saveDockingContext | private void saveDockingContext(VLDockingApplicationPage dockingPage) {
DockingContext dockingContext = dockingPage.getDockingContext();
// Page descriptor needed for config path
VLDockingPageDescriptor vlDockingPageDescriptor = ValkyrieRepository.getInstance().getBean(dockingPage.getId(), VLDo... | java | private void saveDockingContext(VLDockingApplicationPage dockingPage) {
DockingContext dockingContext = dockingPage.getDockingContext();
// Page descriptor needed for config path
VLDockingPageDescriptor vlDockingPageDescriptor = ValkyrieRepository.getInstance().getBean(dockingPage.getId(), VLDo... | [
"private",
"void",
"saveDockingContext",
"(",
"VLDockingApplicationPage",
"dockingPage",
")",
"{",
"DockingContext",
"dockingContext",
"=",
"dockingPage",
".",
"getDockingContext",
"(",
")",
";",
"// Page descriptor needed for config path",
"VLDockingPageDescriptor",
"vlDocking... | Saves the docking layout of a docking page fo the application
@param dockingPage
The application window (needed to hook in for the docking context) | [
"Saves",
"the",
"docking",
"layout",
"of",
"a",
"docking",
"page",
"fo",
"the",
"application"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingApplicationPageFactory.java#L80-L110 |
11,753 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingApplicationPageFactory.java | VLDockingApplicationPageFactory.checkForConfigPath | private void checkForConfigPath(File configFile) {
String desktopLayoutFilePath = configFile.getAbsolutePath();
String configDirPath = desktopLayoutFilePath.substring(0, desktopLayoutFilePath.lastIndexOf(System
.getProperty("file.separator")));
File configDir = new File(configDir... | java | private void checkForConfigPath(File configFile) {
String desktopLayoutFilePath = configFile.getAbsolutePath();
String configDirPath = desktopLayoutFilePath.substring(0, desktopLayoutFilePath.lastIndexOf(System
.getProperty("file.separator")));
File configDir = new File(configDir... | [
"private",
"void",
"checkForConfigPath",
"(",
"File",
"configFile",
")",
"{",
"String",
"desktopLayoutFilePath",
"=",
"configFile",
".",
"getAbsolutePath",
"(",
")",
";",
"String",
"configDirPath",
"=",
"desktopLayoutFilePath",
".",
"substring",
"(",
"0",
",",
"de... | Creates the config directory, if it doesn't exist already
@param configFile
The file for which to create the path | [
"Creates",
"the",
"config",
"directory",
"if",
"it",
"doesn",
"t",
"exist",
"already"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingApplicationPageFactory.java#L118-L132 |
11,754 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.setModel | public void setModel(ListModel model) {
helperList.setModel(model);
dataModel = model;
clearSelection();
// Once we have a model, we can properly size the two display lists
// They should be wide enough to hold the widest string in the model.
// So take the width of the... | java | public void setModel(ListModel model) {
helperList.setModel(model);
dataModel = model;
clearSelection();
// Once we have a model, we can properly size the two display lists
// They should be wide enough to hold the widest string in the model.
// So take the width of the... | [
"public",
"void",
"setModel",
"(",
"ListModel",
"model",
")",
"{",
"helperList",
".",
"setModel",
"(",
"model",
")",
";",
"dataModel",
"=",
"model",
";",
"clearSelection",
"(",
")",
";",
"// Once we have a model, we can properly size the two display lists",
"// They s... | Sets the model that represents the contents or "value" of the list and
clears the list selection.
@param model the <code>ListModel</code> that provides the list of items
for display
@exception IllegalArgumentException if <code>model</code> is
<code>null</code> | [
"Sets",
"the",
"model",
"that",
"represents",
"the",
"contents",
"or",
"value",
"of",
"the",
"list",
"and",
"clears",
"the",
"list",
"selection",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L150-L163 |
11,755 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.setVisibleRowCount | public void setVisibleRowCount(int visibleRowCount) {
sourceList.setVisibleRowCount(visibleRowCount);
chosenList.setVisibleRowCount(visibleRowCount);
helperList.setVisibleRowCount(visibleRowCount);
// Ok, since we've haven't set a preferred size on the helper scroller,
// we can... | java | public void setVisibleRowCount(int visibleRowCount) {
sourceList.setVisibleRowCount(visibleRowCount);
chosenList.setVisibleRowCount(visibleRowCount);
helperList.setVisibleRowCount(visibleRowCount);
// Ok, since we've haven't set a preferred size on the helper scroller,
// we can... | [
"public",
"void",
"setVisibleRowCount",
"(",
"int",
"visibleRowCount",
")",
"{",
"sourceList",
".",
"setVisibleRowCount",
"(",
"visibleRowCount",
")",
";",
"chosenList",
".",
"setVisibleRowCount",
"(",
"visibleRowCount",
")",
";",
"helperList",
".",
"setVisibleRowCoun... | Sets the preferred number of rows in the list that can be displayed
without a scrollbar.
@param visibleRowCount an integer specifying the preferred number of
visible rows | [
"Sets",
"the",
"preferred",
"number",
"of",
"rows",
"in",
"the",
"list",
"that",
"can",
"be",
"displayed",
"without",
"a",
"scrollbar",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L172-L183 |
11,756 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.setEditIcon | public void setEditIcon(Icon editIcon, String text) {
if (editIcon != null) {
editButton.setIcon(editIcon);
if (text != null) {
editButton.setToolTipText(text);
}
editButton.setText("");
} else {
editButton.setIcon(null);
... | java | public void setEditIcon(Icon editIcon, String text) {
if (editIcon != null) {
editButton.setIcon(editIcon);
if (text != null) {
editButton.setToolTipText(text);
}
editButton.setText("");
} else {
editButton.setIcon(null);
... | [
"public",
"void",
"setEditIcon",
"(",
"Icon",
"editIcon",
",",
"String",
"text",
")",
"{",
"if",
"(",
"editIcon",
"!=",
"null",
")",
"{",
"editButton",
".",
"setIcon",
"(",
"editIcon",
")",
";",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"editButton",
... | Set the icon to use on the edit button. If no icon is specified, then
just the label will be used otherwise the text will be a tooltip.
@param editIcon Icon to use on edit button | [
"Set",
"the",
"icon",
"to",
"use",
"on",
"the",
"edit",
"button",
".",
"If",
"no",
"icon",
"is",
"specified",
"then",
"just",
"the",
"label",
"will",
"be",
"used",
"otherwise",
"the",
"text",
"will",
"be",
"a",
"tooltip",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L200-L213 |
11,757 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.setListLabels | public void setListLabels(String chosenLabel, String sourceLabel) {
if (chosenLabel != null) {
this.chosenLabel.setText(chosenLabel);
this.chosenLabel.setVisible(true);
} else {
this.chosenLabel.setVisible(false);
}
if (sourceLabel != null) {
... | java | public void setListLabels(String chosenLabel, String sourceLabel) {
if (chosenLabel != null) {
this.chosenLabel.setText(chosenLabel);
this.chosenLabel.setVisible(true);
} else {
this.chosenLabel.setVisible(false);
}
if (sourceLabel != null) {
... | [
"public",
"void",
"setListLabels",
"(",
"String",
"chosenLabel",
",",
"String",
"sourceLabel",
")",
"{",
"if",
"(",
"chosenLabel",
"!=",
"null",
")",
"{",
"this",
".",
"chosenLabel",
".",
"setText",
"(",
"chosenLabel",
")",
";",
"this",
".",
"chosenLabel",
... | Add labels on top of the 2 lists. If not present, do not show the labels.
@param chosenLabel
@param sourceLabel | [
"Add",
"labels",
"on",
"top",
"of",
"the",
"2",
"lists",
".",
"If",
"not",
"present",
"do",
"not",
"show",
"the",
"labels",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L221-L254 |
11,758 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.buildComponent | protected JComponent buildComponent() {
helperList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
GridBagLayout gbl = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
setLayout(gbl);
editButton = new JButton("Edit...");
editBut... | java | protected JComponent buildComponent() {
helperList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
GridBagLayout gbl = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
setLayout(gbl);
editButton = new JButton("Edit...");
editBut... | [
"protected",
"JComponent",
"buildComponent",
"(",
")",
"{",
"helperList",
".",
"setSelectionMode",
"(",
"ListSelectionModel",
".",
"MULTIPLE_INTERVAL_SELECTION",
")",
";",
"GridBagLayout",
"gbl",
"=",
"new",
"GridBagLayout",
"(",
")",
";",
"GridBagConstraints",
"gbc",... | Build our component panel.
@return component | [
"Build",
"our",
"component",
"panel",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L261-L335 |
11,759 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.buildButtonPanel | protected JPanel buildButtonPanel() {
buttonPanel = new JPanel();
leftToRight = new JButton(">");
allLeftToRight = new JButton(">>");
rightToLeft = new JButton("<");
allRightToLeft = new JButton("<<");
Font smallerFont = leftToRight.getFont().deriveFont(9.0F);
le... | java | protected JPanel buildButtonPanel() {
buttonPanel = new JPanel();
leftToRight = new JButton(">");
allLeftToRight = new JButton(">>");
rightToLeft = new JButton("<");
allRightToLeft = new JButton("<<");
Font smallerFont = leftToRight.getFont().deriveFont(9.0F);
le... | [
"protected",
"JPanel",
"buildButtonPanel",
"(",
")",
"{",
"buttonPanel",
"=",
"new",
"JPanel",
"(",
")",
";",
"leftToRight",
"=",
"new",
"JButton",
"(",
"\">\"",
")",
";",
"allLeftToRight",
"=",
"new",
"JButton",
"(",
"\">>\"",
")",
";",
"rightToLeft",
"="... | Construct the control button panel.
@return JPanel | [
"Construct",
"the",
"control",
"button",
"panel",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L343-L403 |
11,760 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.moveLeftToRight | protected void moveLeftToRight() {
// Loop over the selected items and locate them in the data model, Add
// these to the selection.
Object[] sourceSelected = sourceList.getSelectedValues();
int nSourceSelected = sourceSelected.length;
int[] currentSelection = helperList.getSelec... | java | protected void moveLeftToRight() {
// Loop over the selected items and locate them in the data model, Add
// these to the selection.
Object[] sourceSelected = sourceList.getSelectedValues();
int nSourceSelected = sourceSelected.length;
int[] currentSelection = helperList.getSelec... | [
"protected",
"void",
"moveLeftToRight",
"(",
")",
"{",
"// Loop over the selected items and locate them in the data model, Add",
"// these to the selection.",
"Object",
"[",
"]",
"sourceSelected",
"=",
"sourceList",
".",
"getSelectedValues",
"(",
")",
";",
"int",
"nSourceSele... | Move the selected items in the source list to the chosen list. I.e., add
the items to our selection model. | [
"Move",
"the",
"selected",
"items",
"in",
"the",
"source",
"list",
"to",
"the",
"chosen",
"list",
".",
"I",
".",
"e",
".",
"add",
"the",
"items",
"to",
"our",
"selection",
"model",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L419-L435 |
11,761 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.moveAllLeftToRight | protected void moveAllLeftToRight() {
int sz = dataModel.getSize();
int[] selected = new int[sz];
for (int i = 0; i < sz; i++) {
selected[i] = i;
}
helperList.setSelectedIndices(selected);
update();
} | java | protected void moveAllLeftToRight() {
int sz = dataModel.getSize();
int[] selected = new int[sz];
for (int i = 0; i < sz; i++) {
selected[i] = i;
}
helperList.setSelectedIndices(selected);
update();
} | [
"protected",
"void",
"moveAllLeftToRight",
"(",
")",
"{",
"int",
"sz",
"=",
"dataModel",
".",
"getSize",
"(",
")",
";",
"int",
"[",
"]",
"selected",
"=",
"new",
"int",
"[",
"sz",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"sz",
... | Move all the source items to the chosen side. I.e., select all the items. | [
"Move",
"all",
"the",
"source",
"items",
"to",
"the",
"chosen",
"side",
".",
"I",
".",
"e",
".",
"select",
"all",
"the",
"items",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L440-L448 |
11,762 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.moveRightToLeft | protected void moveRightToLeft() {
Object[] chosenSelectedValues = chosenList.getSelectedValues();
int nChosenSelected = chosenSelectedValues.length;
int[] chosenSelected = new int[nChosenSelected];
if (nChosenSelected == 0) {
return; // Nothing to move
}
//... | java | protected void moveRightToLeft() {
Object[] chosenSelectedValues = chosenList.getSelectedValues();
int nChosenSelected = chosenSelectedValues.length;
int[] chosenSelected = new int[nChosenSelected];
if (nChosenSelected == 0) {
return; // Nothing to move
}
//... | [
"protected",
"void",
"moveRightToLeft",
"(",
")",
"{",
"Object",
"[",
"]",
"chosenSelectedValues",
"=",
"chosenList",
".",
"getSelectedValues",
"(",
")",
";",
"int",
"nChosenSelected",
"=",
"chosenSelectedValues",
".",
"length",
";",
"int",
"[",
"]",
"chosenSele... | Move the selected items in the chosen list to the source list. I.e.,
remove them from our selection model. | [
"Move",
"the",
"selected",
"items",
"in",
"the",
"chosen",
"list",
"to",
"the",
"source",
"list",
".",
"I",
".",
"e",
".",
"remove",
"them",
"from",
"our",
"selection",
"model",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L454-L494 |
11,763 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.indexOf | protected int indexOf(final Object o) {
final int size = dataModel.getSize();
for (int i = 0; i < size; i++) {
if (comparator == null) {
if (o.equals(dataModel.getElementAt(i))) {
return i;
}
} else if (comparator.compare(o, dat... | java | protected int indexOf(final Object o) {
final int size = dataModel.getSize();
for (int i = 0; i < size; i++) {
if (comparator == null) {
if (o.equals(dataModel.getElementAt(i))) {
return i;
}
} else if (comparator.compare(o, dat... | [
"protected",
"int",
"indexOf",
"(",
"final",
"Object",
"o",
")",
"{",
"final",
"int",
"size",
"=",
"dataModel",
".",
"getSize",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"if",
"(",
"compar... | Get the index of a given object in the underlying data model.
@param o Object to locate
@return index of object in model, -1 if not found | [
"Get",
"the",
"index",
"of",
"a",
"given",
"object",
"in",
"the",
"underlying",
"data",
"model",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L510-L523 |
11,764 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java | ShuttleList.update | protected void update() {
int sz = dataModel.getSize();
int[] selected = helperList.getSelectedIndices();
ArrayList sourceItems = new ArrayList(sz);
ArrayList chosenItems = new ArrayList(selected.length);
// Start with the source items filled from our data model
for (int... | java | protected void update() {
int sz = dataModel.getSize();
int[] selected = helperList.getSelectedIndices();
ArrayList sourceItems = new ArrayList(sz);
ArrayList chosenItems = new ArrayList(selected.length);
// Start with the source items filled from our data model
for (int... | [
"protected",
"void",
"update",
"(",
")",
"{",
"int",
"sz",
"=",
"dataModel",
".",
"getSize",
"(",
")",
";",
"int",
"[",
"]",
"selected",
"=",
"helperList",
".",
"getSelectedIndices",
"(",
")",
";",
"ArrayList",
"sourceItems",
"=",
"new",
"ArrayList",
"("... | Update the two lists based on the current selection indices. | [
"Update",
"the",
"two",
"lists",
"based",
"on",
"the",
"current",
"selection",
"indices",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/ShuttleList.java#L528-L549 |
11,765 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/AbstractListBinding.java | AbstractListBinding.convertValue | protected Object convertValue(Object value, Class targetClass) throws ConversionException {
Assert.notNull(value);
Assert.notNull(targetClass);
return getConversionService().getConversionExecutor(value.getClass(), targetClass).execute(value);
} | java | protected Object convertValue(Object value, Class targetClass) throws ConversionException {
Assert.notNull(value);
Assert.notNull(targetClass);
return getConversionService().getConversionExecutor(value.getClass(), targetClass).execute(value);
} | [
"protected",
"Object",
"convertValue",
"(",
"Object",
"value",
",",
"Class",
"targetClass",
")",
"throws",
"ConversionException",
"{",
"Assert",
".",
"notNull",
"(",
"value",
")",
";",
"Assert",
".",
"notNull",
"(",
"targetClass",
")",
";",
"return",
"getConve... | Converts the given object value into the given targetClass
@param value
the value to convert
@param targetClass
the target class to convert the value to
@return the converted value
@throws org.springframework.binding.convert.ConversionException
if the value can not be converted | [
"Converts",
"the",
"given",
"object",
"value",
"into",
"the",
"given",
"targetClass"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/AbstractListBinding.java#L157-L161 |
11,766 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java | BufferedValueModel.setValue | public void setValue(Object value) {
if (logger.isDebugEnabled()) {
logger.debug("Setting buffered value to '" + value + "'");
}
final Object oldValue = getValue();
this.bufferedValue = value;
updateBuffering();
fireValueChange(oldValue, bufferedValue);
} | java | public void setValue(Object value) {
if (logger.isDebugEnabled()) {
logger.debug("Setting buffered value to '" + value + "'");
}
final Object oldValue = getValue();
this.bufferedValue = value;
updateBuffering();
fireValueChange(oldValue, bufferedValue);
} | [
"public",
"void",
"setValue",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Setting buffered value to '\"",
"+",
"value",
"+",
"\"'\"",
")",
";",
"}",
"final",
"Object",
... | Sets a new buffered value and turns this BufferedValueModel into
the buffering state. The buffered value is not provided to the
underlying model until the trigger channel indicates a commit.
@param value the value to be buffered | [
"Sets",
"a",
"new",
"buffered",
"value",
"and",
"turns",
"this",
"BufferedValueModel",
"into",
"the",
"buffering",
"state",
".",
"The",
"buffered",
"value",
"is",
"not",
"provided",
"to",
"the",
"underlying",
"model",
"until",
"the",
"trigger",
"channel",
"ind... | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java#L141-L149 |
11,767 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java | BufferedValueModel.onWrappedValueChanged | protected void onWrappedValueChanged() {
if (logger.isDebugEnabled()) {
logger.debug("Wrapped model value has changed; new value is '" + wrappedModel.getValue() + "'");
}
setValue(wrappedModel.getValue());
} | java | protected void onWrappedValueChanged() {
if (logger.isDebugEnabled()) {
logger.debug("Wrapped model value has changed; new value is '" + wrappedModel.getValue() + "'");
}
setValue(wrappedModel.getValue());
} | [
"protected",
"void",
"onWrappedValueChanged",
"(",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Wrapped model value has changed; new value is '\"",
"+",
"wrappedModel",
".",
"getValue",
"(",
")",
"+",
... | Called when the value held by the wrapped value model changes. | [
"Called",
"when",
"the",
"value",
"held",
"by",
"the",
"wrapped",
"value",
"model",
"changes",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java#L180-L185 |
11,768 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java | BufferedValueModel.commit | public void commit() {
if (isBuffering()) {
if (logger.isDebugEnabled()) {
logger.debug("Committing buffered value '" + getValue() + "' to wrapped value model '" + wrappedModel
+ "'");
}
wrappedModel.setValueSilently(getValueToCommit(),... | java | public void commit() {
if (isBuffering()) {
if (logger.isDebugEnabled()) {
logger.debug("Committing buffered value '" + getValue() + "' to wrapped value model '" + wrappedModel
+ "'");
}
wrappedModel.setValueSilently(getValueToCommit(),... | [
"public",
"void",
"commit",
"(",
")",
"{",
"if",
"(",
"isBuffering",
"(",
")",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Committing buffered value '\"",
"+",
"getValue",
"(",
")",
"+",
"\"... | Commits the value buffered by this value model back to the
wrapped value model. | [
"Commits",
"the",
"value",
"buffered",
"by",
"this",
"value",
"model",
"back",
"to",
"the",
"wrapped",
"value",
"model",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java#L191-L205 |
11,769 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java | BufferedValueModel.updateBuffering | private void updateBuffering() {
boolean wasBuffering = isBuffering();
buffering = hasValueChanged(wrappedModel.getValue(), bufferedValue);
firePropertyChange(BUFFERING_PROPERTY, wasBuffering, buffering);
} | java | private void updateBuffering() {
boolean wasBuffering = isBuffering();
buffering = hasValueChanged(wrappedModel.getValue(), bufferedValue);
firePropertyChange(BUFFERING_PROPERTY, wasBuffering, buffering);
} | [
"private",
"void",
"updateBuffering",
"(",
")",
"{",
"boolean",
"wasBuffering",
"=",
"isBuffering",
"(",
")",
";",
"buffering",
"=",
"hasValueChanged",
"(",
"wrappedModel",
".",
"getValue",
"(",
")",
",",
"bufferedValue",
")",
";",
"firePropertyChange",
"(",
"... | Updates the value of the buffering property. Fires a property change event
if there's been a change. | [
"Updates",
"the",
"value",
"of",
"the",
"buffering",
"property",
".",
"Fires",
"a",
"property",
"change",
"event",
"if",
"there",
"s",
"been",
"a",
"change",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java#L219-L223 |
11,770 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java | BufferedValueModel.revert | public final void revert() {
if (isBuffering()) {
if (logger.isDebugEnabled()) {
logger.debug("Reverting buffered value '" + getValue() + "' to value '" + wrappedModel.getValue() + "'");
}
setValue(wrappedModel.getValue());
}
else {
... | java | public final void revert() {
if (isBuffering()) {
if (logger.isDebugEnabled()) {
logger.debug("Reverting buffered value '" + getValue() + "' to value '" + wrappedModel.getValue() + "'");
}
setValue(wrappedModel.getValue());
}
else {
... | [
"public",
"final",
"void",
"revert",
"(",
")",
"{",
"if",
"(",
"isBuffering",
"(",
")",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Reverting buffered value '\"",
"+",
"getValue",
"(",
")",
... | Reverts the value held by the value model back to the value held by the
wrapped value model. | [
"Reverts",
"the",
"value",
"held",
"by",
"the",
"value",
"model",
"back",
"to",
"the",
"value",
"held",
"by",
"the",
"wrapped",
"value",
"model",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/BufferedValueModel.java#L229-L241 |
11,771 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandButtonLabelInfo.java | CommandButtonLabelInfo.configure | public AbstractButton configure(AbstractButton button) {
Assert.notNull(button);
button.setText(this.labelInfo.getText());
button.setMnemonic(this.labelInfo.getMnemonic());
button.setDisplayedMnemonicIndex(this.labelInfo.getMnemonicIndex());
configureAccelerator(button, getAccele... | java | public AbstractButton configure(AbstractButton button) {
Assert.notNull(button);
button.setText(this.labelInfo.getText());
button.setMnemonic(this.labelInfo.getMnemonic());
button.setDisplayedMnemonicIndex(this.labelInfo.getMnemonicIndex());
configureAccelerator(button, getAccele... | [
"public",
"AbstractButton",
"configure",
"(",
"AbstractButton",
"button",
")",
"{",
"Assert",
".",
"notNull",
"(",
"button",
")",
";",
"button",
".",
"setText",
"(",
"this",
".",
"labelInfo",
".",
"getText",
"(",
")",
")",
";",
"button",
".",
"setMnemonic"... | Configures an existing button appropriately based on this label info's
properties.
@param button | [
"Configures",
"an",
"existing",
"button",
"appropriately",
"based",
"on",
"this",
"label",
"info",
"s",
"properties",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandButtonLabelInfo.java#L249-L256 |
11,772 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandButtonLabelInfo.java | CommandButtonLabelInfo.configureAccelerator | protected void configureAccelerator(AbstractButton button, KeyStroke keystrokeAccelerator) {
if ((button instanceof JMenuItem) && !(button instanceof JMenu)) {
((JMenuItem)button).setAccelerator(keystrokeAccelerator);
}
} | java | protected void configureAccelerator(AbstractButton button, KeyStroke keystrokeAccelerator) {
if ((button instanceof JMenuItem) && !(button instanceof JMenu)) {
((JMenuItem)button).setAccelerator(keystrokeAccelerator);
}
} | [
"protected",
"void",
"configureAccelerator",
"(",
"AbstractButton",
"button",
",",
"KeyStroke",
"keystrokeAccelerator",
")",
"{",
"if",
"(",
"(",
"button",
"instanceof",
"JMenuItem",
")",
"&&",
"!",
"(",
"button",
"instanceof",
"JMenu",
")",
")",
"{",
"(",
"("... | Sets the given keystroke accelerator on the given button.
@param button The button. May be null.
@param keystrokeAccelerator The accelerator. May be null. | [
"Sets",
"the",
"given",
"keystroke",
"accelerator",
"on",
"the",
"given",
"button",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/config/CommandButtonLabelInfo.java#L264-L268 |
11,773 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/factory/DefaultComponentFactory.java | DefaultComponentFactory.getRequiredMessage | protected String getRequiredMessage(final String[] messageKeys) {
MessageSourceResolvable resolvable = new MessageSourceResolvable() {
public String[] getCodes() {
return messageKeys;
}
public Object[] getArguments() {
return null;
}
public String getDefaultMessage() {
if (messageKeys.le... | java | protected String getRequiredMessage(final String[] messageKeys) {
MessageSourceResolvable resolvable = new MessageSourceResolvable() {
public String[] getCodes() {
return messageKeys;
}
public Object[] getArguments() {
return null;
}
public String getDefaultMessage() {
if (messageKeys.le... | [
"protected",
"String",
"getRequiredMessage",
"(",
"final",
"String",
"[",
"]",
"messageKeys",
")",
"{",
"MessageSourceResolvable",
"resolvable",
"=",
"new",
"MessageSourceResolvable",
"(",
")",
"{",
"public",
"String",
"[",
"]",
"getCodes",
"(",
")",
"{",
"retur... | Get the message for the given key. Don't throw an exception if it's not
found but return a default value.
@param messageKeys The keys to use when looking for the message.
@return the message found in the resources or a default message. | [
"Get",
"the",
"message",
"for",
"the",
"given",
"key",
".",
"Don",
"t",
"throw",
"an",
"exception",
"if",
"it",
"s",
"not",
"found",
"but",
"return",
"a",
"default",
"value",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/factory/DefaultComponentFactory.java#L122-L141 |
11,774 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/factory/DefaultComponentFactory.java | DefaultComponentFactory.createTable | public JTable createTable(TableModel model) {
return (getTableFactory() != null) ? getTableFactory().createTable(model) : new JTable(model);
} | java | public JTable createTable(TableModel model) {
return (getTableFactory() != null) ? getTableFactory().createTable(model) : new JTable(model);
} | [
"public",
"JTable",
"createTable",
"(",
"TableModel",
"model",
")",
"{",
"return",
"(",
"getTableFactory",
"(",
")",
"!=",
"null",
")",
"?",
"getTableFactory",
"(",
")",
".",
"createTable",
"(",
"model",
")",
":",
"new",
"JTable",
"(",
"model",
")",
";",... | Construct a JTable with the specified table model. It will delegate the
creation to a TableFactory if it exists.
@param model the table model
@return The new table. | [
"Construct",
"a",
"JTable",
"with",
"the",
"specified",
"table",
"model",
".",
"It",
"will",
"delegate",
"the",
"creation",
"to",
"a",
"TableFactory",
"if",
"it",
"exists",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/factory/DefaultComponentFactory.java#L460-L462 |
11,775 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/StringSelectionListBinding.java | StringSelectionListBinding.createLabels | private String[] createLabels(final String id, final Object[] keys)
{
String[] messages = new String[keys.length];
for (int i = 0; i < messages.length; ++i)
{
messages[i] = getApplicationConfig().messageResolver().getMessage(id, keys[i] == null ? "null" : keys[i].toString(),
... | java | private String[] createLabels(final String id, final Object[] keys)
{
String[] messages = new String[keys.length];
for (int i = 0; i < messages.length; ++i)
{
messages[i] = getApplicationConfig().messageResolver().getMessage(id, keys[i] == null ? "null" : keys[i].toString(),
... | [
"private",
"String",
"[",
"]",
"createLabels",
"(",
"final",
"String",
"id",
",",
"final",
"Object",
"[",
"]",
"keys",
")",
"{",
"String",
"[",
"]",
"messages",
"=",
"new",
"String",
"[",
"keys",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"="... | Will resolve keys to messages using 'id'.'key'.label as a message
resource key.
@param id
id to use with message key resolving.
@param keys
keys to extract messages from.
@return array containing labels/messages for each key. | [
"Will",
"resolve",
"keys",
"to",
"messages",
"using",
"id",
".",
"key",
".",
"label",
"as",
"a",
"message",
"resource",
"key",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/StringSelectionListBinding.java#L81-L90 |
11,776 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/StringSelectionListBinding.java | StringSelectionListBinding.getLabelsFromMap | public static Collection getLabelsFromMap(Collection sortedKeys, Map keysAndLabels)
{
Collection<Object> labels = new ArrayList<Object>();
Iterator keyIt = sortedKeys.iterator();
while (keyIt.hasNext())
{
labels.add(keysAndLabels.get(keyIt.next()));
}
retu... | java | public static Collection getLabelsFromMap(Collection sortedKeys, Map keysAndLabels)
{
Collection<Object> labels = new ArrayList<Object>();
Iterator keyIt = sortedKeys.iterator();
while (keyIt.hasNext())
{
labels.add(keysAndLabels.get(keyIt.next()));
}
retu... | [
"public",
"static",
"Collection",
"getLabelsFromMap",
"(",
"Collection",
"sortedKeys",
",",
"Map",
"keysAndLabels",
")",
"{",
"Collection",
"<",
"Object",
">",
"labels",
"=",
"new",
"ArrayList",
"<",
"Object",
">",
"(",
")",
";",
"Iterator",
"keyIt",
"=",
"s... | Will extract labels from a map in sorted order.
@param sortedKeys
collection with keys in the appropriate order. Each key
corresponds to one in the map.
@param keysAndLabels
map containing both, keys and labels, from which the labels
have to be extracted.
@return a collection containing the labels corresponding to the... | [
"Will",
"extract",
"labels",
"from",
"a",
"map",
"in",
"sorted",
"order",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/StringSelectionListBinding.java#L104-L113 |
11,777 | instacount/appengine-counter | src/main/java/io/instacount/appengine/counter/data/CounterShardData.java | CounterShardData.constructCounterShardIdentifier | @VisibleForTesting
static String constructCounterShardIdentifier(final String counterName, final int shardNumber)
{
Preconditions.checkNotNull(counterName);
Preconditions.checkArgument(!StringUtils.isBlank(counterName),
"CounterData Names may not be null, blank, or empty!");
Preconditions.checkArgument(shard... | java | @VisibleForTesting
static String constructCounterShardIdentifier(final String counterName, final int shardNumber)
{
Preconditions.checkNotNull(counterName);
Preconditions.checkArgument(!StringUtils.isBlank(counterName),
"CounterData Names may not be null, blank, or empty!");
Preconditions.checkArgument(shard... | [
"@",
"VisibleForTesting",
"static",
"String",
"constructCounterShardIdentifier",
"(",
"final",
"String",
"counterName",
",",
"final",
"int",
"shardNumber",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"counterName",
")",
";",
"Preconditions",
".",
"checkArgume... | Helper method to set the internal identifier for this entity.
@param counterName
@param shardNumber A unique identifier to distinguish shards for the same {@code counterName} from each other. | [
"Helper",
"method",
"to",
"set",
"the",
"internal",
"identifier",
"for",
"this",
"entity",
"."
] | 60aa86ab28f173ec1642539926b69924b8bda238 | https://github.com/instacount/appengine-counter/blob/60aa86ab28f173ec1642539926b69924b8bda238/src/main/java/io/instacount/appengine/counter/data/CounterShardData.java#L150-L159 |
11,778 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/closure/support/StringLength.java | StringLength.call | public Object call(Object value) {
if (value == null) { return new Integer(0); }
return new Integer(String.valueOf(value).length());
} | java | public Object call(Object value) {
if (value == null) { return new Integer(0); }
return new Integer(String.valueOf(value).length());
} | [
"public",
"Object",
"call",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"new",
"Integer",
"(",
"0",
")",
";",
"}",
"return",
"new",
"Integer",
"(",
"String",
".",
"valueOf",
"(",
"value",
")",
".",
"lengt... | Evaluate the string form of the object returning an Integer representing
the string length.
@return The string length Integer.
@see Closure#call(java.lang.Object) | [
"Evaluate",
"the",
"string",
"form",
"of",
"the",
"object",
"returning",
"an",
"Integer",
"representing",
"the",
"string",
"length",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/closure/support/StringLength.java#L46-L49 |
11,779 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/support/DefaultRulesSource.java | DefaultRulesSource.addRules | public void addRules(Rules rules) {
if (logger.isDebugEnabled()) {
logger.debug("Adding rules -> " + rules);
}
addRules(DEFAULT_CONTEXT_ID, rules);
} | java | public void addRules(Rules rules) {
if (logger.isDebugEnabled()) {
logger.debug("Adding rules -> " + rules);
}
addRules(DEFAULT_CONTEXT_ID, rules);
} | [
"public",
"void",
"addRules",
"(",
"Rules",
"rules",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Adding rules -> \"",
"+",
"rules",
")",
";",
"}",
"addRules",
"(",
"DEFAULT_CONTEXT_ID",
",",
"... | Add or update the rules for a single bean class.
@param rules
The rules. | [
"Add",
"or",
"update",
"the",
"rules",
"for",
"a",
"single",
"bean",
"class",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/support/DefaultRulesSource.java#L57-L62 |
11,780 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java | PropertyAccessorUtils.getParentPropertyPath | public static String getParentPropertyPath(String propertyPath) {
int propertySeparatorIndex = getLastNestedPropertySeparatorIndex(propertyPath);
return propertySeparatorIndex == -1? "": propertyPath.substring(0, propertySeparatorIndex);
} | java | public static String getParentPropertyPath(String propertyPath) {
int propertySeparatorIndex = getLastNestedPropertySeparatorIndex(propertyPath);
return propertySeparatorIndex == -1? "": propertyPath.substring(0, propertySeparatorIndex);
} | [
"public",
"static",
"String",
"getParentPropertyPath",
"(",
"String",
"propertyPath",
")",
"{",
"int",
"propertySeparatorIndex",
"=",
"getLastNestedPropertySeparatorIndex",
"(",
"propertyPath",
")",
";",
"return",
"propertySeparatorIndex",
"==",
"-",
"1",
"?",
"\"\"",
... | Returns the path to the parent component of the provided property path. | [
"Returns",
"the",
"path",
"to",
"the",
"parent",
"component",
"of",
"the",
"provided",
"property",
"path",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java#L31-L34 |
11,781 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java | PropertyAccessorUtils.getPropertyName | public static String getPropertyName(String propertyPath) {
int propertySeparatorIndex = PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(propertyPath);
return propertySeparatorIndex == -1? propertyPath: propertyPath.substring(propertySeparatorIndex + 1);
} | java | public static String getPropertyName(String propertyPath) {
int propertySeparatorIndex = PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(propertyPath);
return propertySeparatorIndex == -1? propertyPath: propertyPath.substring(propertySeparatorIndex + 1);
} | [
"public",
"static",
"String",
"getPropertyName",
"(",
"String",
"propertyPath",
")",
"{",
"int",
"propertySeparatorIndex",
"=",
"PropertyAccessorUtils",
".",
"getLastNestedPropertySeparatorIndex",
"(",
"propertyPath",
")",
";",
"return",
"propertySeparatorIndex",
"==",
"-... | Returns the last component of the specified property path | [
"Returns",
"the",
"last",
"component",
"of",
"the",
"specified",
"property",
"path"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java#L39-L42 |
11,782 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java | PropertyAccessorUtils.isIndexedProperty | public static boolean isIndexedProperty(String propertyName) {
return propertyName.indexOf(PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR) != -1
&& propertyName.charAt(propertyName.length() - 1) == PropertyAccessor.PROPERTY_KEY_SUFFIX_CHAR;
} | java | public static boolean isIndexedProperty(String propertyName) {
return propertyName.indexOf(PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR) != -1
&& propertyName.charAt(propertyName.length() - 1) == PropertyAccessor.PROPERTY_KEY_SUFFIX_CHAR;
} | [
"public",
"static",
"boolean",
"isIndexedProperty",
"(",
"String",
"propertyName",
")",
"{",
"return",
"propertyName",
".",
"indexOf",
"(",
"PropertyAccessor",
".",
"PROPERTY_KEY_PREFIX_CHAR",
")",
"!=",
"-",
"1",
"&&",
"propertyName",
".",
"charAt",
"(",
"propert... | Tests whether the specified property path denotes an indexed property. | [
"Tests",
"whether",
"the",
"specified",
"property",
"path",
"denotes",
"an",
"indexed",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/beans/PropertyAccessorUtils.java#L47-L50 |
11,783 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.regexp | public Constraint regexp(String regexp, String type) {
RegexpConstraint c = new RegexpConstraint(regexp);
c.setType(type);
return c;
} | java | public Constraint regexp(String regexp, String type) {
RegexpConstraint c = new RegexpConstraint(regexp);
c.setType(type);
return c;
} | [
"public",
"Constraint",
"regexp",
"(",
"String",
"regexp",
",",
"String",
"type",
")",
"{",
"RegexpConstraint",
"c",
"=",
"new",
"RegexpConstraint",
"(",
"regexp",
")",
";",
"c",
".",
"setType",
"(",
"type",
")",
";",
"return",
"c",
";",
"}"
] | Creates a constraint backed by a regular expression, with a type for
reporting.
@param regexp The regular expression string.
@return The constraint. | [
"Creates",
"a",
"constraint",
"backed",
"by",
"a",
"regular",
"expression",
"with",
"a",
"type",
"for",
"reporting",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L437-L441 |
11,784 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.method | public Constraint method(Object target, String methodName, String constraintType) {
return new MethodInvokingConstraint(target, methodName, constraintType);
} | java | public Constraint method(Object target, String methodName, String constraintType) {
return new MethodInvokingConstraint(target, methodName, constraintType);
} | [
"public",
"Constraint",
"method",
"(",
"Object",
"target",
",",
"String",
"methodName",
",",
"String",
"constraintType",
")",
"{",
"return",
"new",
"MethodInvokingConstraint",
"(",
"target",
",",
"methodName",
",",
"constraintType",
")",
";",
"}"
] | Returns a constraint whose test is determined by a boolean method on a
target object.
@param target The targetObject
@param methodName The method name
@return The constraint. | [
"Returns",
"a",
"constraint",
"whose",
"test",
"is",
"determined",
"by",
"a",
"boolean",
"method",
"on",
"a",
"target",
"object",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L451-L453 |
11,785 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.not | public Constraint not(Constraint constraint) {
if (!(constraint instanceof Not))
return new Not(constraint);
return ((Not)constraint).getConstraint();
} | java | public Constraint not(Constraint constraint) {
if (!(constraint instanceof Not))
return new Not(constraint);
return ((Not)constraint).getConstraint();
} | [
"public",
"Constraint",
"not",
"(",
"Constraint",
"constraint",
")",
"{",
"if",
"(",
"!",
"(",
"constraint",
"instanceof",
"Not",
")",
")",
"return",
"new",
"Not",
"(",
"constraint",
")",
";",
"return",
"(",
"(",
"Not",
")",
"constraint",
")",
".",
"ge... | Negate the specified constraint.
@param constraint The constraint to negate
@return The negated constraint. | [
"Negate",
"the",
"specified",
"constraint",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L563-L568 |
11,786 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.all | public PropertyConstraint all(String propertyName, Constraint[] constraints) {
return value(propertyName, all(constraints));
} | java | public PropertyConstraint all(String propertyName, Constraint[] constraints) {
return value(propertyName, all(constraints));
} | [
"public",
"PropertyConstraint",
"all",
"(",
"String",
"propertyName",
",",
"Constraint",
"[",
"]",
"constraints",
")",
"{",
"return",
"value",
"(",
"propertyName",
",",
"all",
"(",
"constraints",
")",
")",
";",
"}"
] | Apply an "all" value constraint to the provided bean property.
@param propertyName The bean property name
@param constraints The constraints that form a all conjunction
@return | [
"Apply",
"an",
"all",
"value",
"constraint",
"to",
"the",
"provided",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L630-L632 |
11,787 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.any | public PropertyConstraint any(String propertyName, Constraint[] constraints) {
return value(propertyName, any(constraints));
} | java | public PropertyConstraint any(String propertyName, Constraint[] constraints) {
return value(propertyName, any(constraints));
} | [
"public",
"PropertyConstraint",
"any",
"(",
"String",
"propertyName",
",",
"Constraint",
"[",
"]",
"constraints",
")",
"{",
"return",
"value",
"(",
"propertyName",
",",
"any",
"(",
"constraints",
")",
")",
";",
"}"
] | Apply an "any" value constraint to the provided bean property.
@param propertyName The bean property name
@param constraints The constraints that form a all disjunction
@return | [
"Apply",
"an",
"any",
"value",
"constraint",
"to",
"the",
"provided",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L641-L643 |
11,788 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.eq | public PropertyConstraint eq(String propertyName, Object propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, eq(propertyValue));
} | java | public PropertyConstraint eq(String propertyName, Object propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, eq(propertyValue));
} | [
"public",
"PropertyConstraint",
"eq",
"(",
"String",
"propertyName",
",",
"Object",
"propertyValue",
")",
"{",
"return",
"new",
"ParameterizedPropertyConstraint",
"(",
"propertyName",
",",
"eq",
"(",
"propertyValue",
")",
")",
";",
"}"
] | Apply a "equal to" constraint to a bean property.
@param propertyName The first property
@param propertyValue The constraint value
@return The constraint | [
"Apply",
"a",
"equal",
"to",
"constraint",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L666-L668 |
11,789 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.gt | public PropertyConstraint gt(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, gt(propertyValue));
} | java | public PropertyConstraint gt(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, gt(propertyValue));
} | [
"public",
"PropertyConstraint",
"gt",
"(",
"String",
"propertyName",
",",
"Comparable",
"propertyValue",
")",
"{",
"return",
"new",
"ParameterizedPropertyConstraint",
"(",
"propertyName",
",",
"gt",
"(",
"propertyValue",
")",
")",
";",
"}"
] | Apply a "greater than" constraint to a bean property.
@param propertyName The first property
@param propertyValue The constraint value
@return The constraint | [
"Apply",
"a",
"greater",
"than",
"constraint",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L691-L693 |
11,790 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.gte | public PropertyConstraint gte(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, gte(propertyValue));
} | java | public PropertyConstraint gte(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, gte(propertyValue));
} | [
"public",
"PropertyConstraint",
"gte",
"(",
"String",
"propertyName",
",",
"Comparable",
"propertyValue",
")",
"{",
"return",
"new",
"ParameterizedPropertyConstraint",
"(",
"propertyName",
",",
"gte",
"(",
"propertyValue",
")",
")",
";",
"}"
] | Apply a "greater than equal to" constraint to a bean property.
@param propertyName The first property
@param propertyValue The constraint value
@return The constraint | [
"Apply",
"a",
"greater",
"than",
"equal",
"to",
"constraint",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L702-L704 |
11,791 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.lt | public PropertyConstraint lt(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, lt(propertyValue));
} | java | public PropertyConstraint lt(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, lt(propertyValue));
} | [
"public",
"PropertyConstraint",
"lt",
"(",
"String",
"propertyName",
",",
"Comparable",
"propertyValue",
")",
"{",
"return",
"new",
"ParameterizedPropertyConstraint",
"(",
"propertyName",
",",
"lt",
"(",
"propertyValue",
")",
")",
";",
"}"
] | Apply a "less than" constraint to a bean property.
@param propertyName The first property
@param propertyValue The constraint value
@return The constraint | [
"Apply",
"a",
"less",
"than",
"constraint",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L713-L715 |
11,792 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.lte | public PropertyConstraint lte(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, lte(propertyValue));
} | java | public PropertyConstraint lte(String propertyName, Comparable propertyValue) {
return new ParameterizedPropertyConstraint(propertyName, lte(propertyValue));
} | [
"public",
"PropertyConstraint",
"lte",
"(",
"String",
"propertyName",
",",
"Comparable",
"propertyValue",
")",
"{",
"return",
"new",
"ParameterizedPropertyConstraint",
"(",
"propertyName",
",",
"lte",
"(",
"propertyValue",
")",
")",
";",
"}"
] | Apply a "less than equal to" constraint to a bean property.
@param propertyName The first property
@param propertyValue The constraint value
@return The constraint | [
"Apply",
"a",
"less",
"than",
"equal",
"to",
"constraint",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L724-L726 |
11,793 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.eqProperty | public PropertyConstraint eqProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, EqualTo.instance(), otherPropertyName);
} | java | public PropertyConstraint eqProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, EqualTo.instance(), otherPropertyName);
} | [
"public",
"PropertyConstraint",
"eqProperty",
"(",
"String",
"propertyName",
",",
"String",
"otherPropertyName",
")",
"{",
"return",
"valueProperties",
"(",
"propertyName",
",",
"EqualTo",
".",
"instance",
"(",
")",
",",
"otherPropertyName",
")",
";",
"}"
] | Apply a "equal to" constraint to two bean properties.
@param propertyName The first property
@param otherPropertyName The other property
@return The constraint | [
"Apply",
"a",
"equal",
"to",
"constraint",
"to",
"two",
"bean",
"properties",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L842-L844 |
11,794 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.gtProperty | public PropertyConstraint gtProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, GreaterThan.instance(), otherPropertyName);
} | java | public PropertyConstraint gtProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, GreaterThan.instance(), otherPropertyName);
} | [
"public",
"PropertyConstraint",
"gtProperty",
"(",
"String",
"propertyName",
",",
"String",
"otherPropertyName",
")",
"{",
"return",
"valueProperties",
"(",
"propertyName",
",",
"GreaterThan",
".",
"instance",
"(",
")",
",",
"otherPropertyName",
")",
";",
"}"
] | Apply a "greater than" constraint to two properties
@param propertyName The first property
@param otherPropertyName The other property
@return The constraint | [
"Apply",
"a",
"greater",
"than",
"constraint",
"to",
"two",
"properties"
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L853-L855 |
11,795 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.gteProperty | public PropertyConstraint gteProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, GreaterThanEqualTo.instance(), otherPropertyName);
} | java | public PropertyConstraint gteProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, GreaterThanEqualTo.instance(), otherPropertyName);
} | [
"public",
"PropertyConstraint",
"gteProperty",
"(",
"String",
"propertyName",
",",
"String",
"otherPropertyName",
")",
"{",
"return",
"valueProperties",
"(",
"propertyName",
",",
"GreaterThanEqualTo",
".",
"instance",
"(",
")",
",",
"otherPropertyName",
")",
";",
"}... | Apply a "greater than or equal to" constraint to two properties.
@param propertyName The first property
@param otherPropertyName The other property
@return The constraint | [
"Apply",
"a",
"greater",
"than",
"or",
"equal",
"to",
"constraint",
"to",
"two",
"properties",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L864-L866 |
11,796 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.ltProperty | public PropertyConstraint ltProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, LessThan.instance(), otherPropertyName);
} | java | public PropertyConstraint ltProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, LessThan.instance(), otherPropertyName);
} | [
"public",
"PropertyConstraint",
"ltProperty",
"(",
"String",
"propertyName",
",",
"String",
"otherPropertyName",
")",
"{",
"return",
"valueProperties",
"(",
"propertyName",
",",
"LessThan",
".",
"instance",
"(",
")",
",",
"otherPropertyName",
")",
";",
"}"
] | Apply a "less than" constraint to two properties.
@param propertyName The first property
@param otherPropertyName The other property
@return The constraint | [
"Apply",
"a",
"less",
"than",
"constraint",
"to",
"two",
"properties",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L875-L877 |
11,797 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.lteProperty | public PropertyConstraint lteProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, LessThanEqualTo.instance(), otherPropertyName);
} | java | public PropertyConstraint lteProperty(String propertyName, String otherPropertyName) {
return valueProperties(propertyName, LessThanEqualTo.instance(), otherPropertyName);
} | [
"public",
"PropertyConstraint",
"lteProperty",
"(",
"String",
"propertyName",
",",
"String",
"otherPropertyName",
")",
"{",
"return",
"valueProperties",
"(",
"propertyName",
",",
"LessThanEqualTo",
".",
"instance",
"(",
")",
",",
"otherPropertyName",
")",
";",
"}"
] | Apply a "less than or equal to" constraint to two properties.
@param propertyName The first property
@param otherPropertyName The other property
@return The constraint | [
"Apply",
"a",
"less",
"than",
"or",
"equal",
"to",
"constraint",
"to",
"two",
"properties",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L886-L888 |
11,798 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java | Constraints.inRangeProperties | public PropertyConstraint inRangeProperties(String propertyName, String minPropertyName, String maxPropertyName) {
Constraint min = gteProperty(propertyName, minPropertyName);
Constraint max = lteProperty(propertyName, maxPropertyName);
return new CompoundPropertyConstraint(new And(min, max));
... | java | public PropertyConstraint inRangeProperties(String propertyName, String minPropertyName, String maxPropertyName) {
Constraint min = gteProperty(propertyName, minPropertyName);
Constraint max = lteProperty(propertyName, maxPropertyName);
return new CompoundPropertyConstraint(new And(min, max));
... | [
"public",
"PropertyConstraint",
"inRangeProperties",
"(",
"String",
"propertyName",
",",
"String",
"minPropertyName",
",",
"String",
"maxPropertyName",
")",
"{",
"Constraint",
"min",
"=",
"gteProperty",
"(",
"propertyName",
",",
"minPropertyName",
")",
";",
"Constrain... | Apply a inclusive "range" constraint between two other properties to a
bean property.
@param propertyName the property with the range constraint.
@param minPropertyName the low edge of the range
@param maxPropertyName the high edge of the range
@return The range constraint constraint | [
"Apply",
"a",
"inclusive",
"range",
"constraint",
"between",
"two",
"other",
"properties",
"to",
"a",
"bean",
"property",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L911-L915 |
11,799 | lievendoclo/Valkyrie-RCP | valkyrie-rcp-samples/valkyrie-rcp-simple-sample/src/main/java/org/valkyriercp/sample/simple/ui/ContactTable.java | ContactTable.getSelectedContacts | public Contact[] getSelectedContacts() {
int[] selected = getTable().getSelectedRows();
Contact[] contacts = new Contact[selected.length];
for (int i = 0; i < selected.length; i++) {
contacts[i] = (Contact) getTableModel().getElementAt(selected[i]);
}
return contacts;
} | java | public Contact[] getSelectedContacts() {
int[] selected = getTable().getSelectedRows();
Contact[] contacts = new Contact[selected.length];
for (int i = 0; i < selected.length; i++) {
contacts[i] = (Contact) getTableModel().getElementAt(selected[i]);
}
return contacts;
} | [
"public",
"Contact",
"[",
"]",
"getSelectedContacts",
"(",
")",
"{",
"int",
"[",
"]",
"selected",
"=",
"getTable",
"(",
")",
".",
"getSelectedRows",
"(",
")",
";",
"Contact",
"[",
"]",
"contacts",
"=",
"new",
"Contact",
"[",
"selected",
".",
"length",
... | Get the array of selected Contact objects in the table.
@return array of Contacts, zero length if nothing is selected | [
"Get",
"the",
"array",
"of",
"selected",
"Contact",
"objects",
"in",
"the",
"table",
"."
] | 6aad6e640b348cda8f3b0841f6e42025233f1eb8 | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-samples/valkyrie-rcp-simple-sample/src/main/java/org/valkyriercp/sample/simple/ui/ContactTable.java#L65-L72 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.