-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #801 from zinggAI/selectCols
using ZidAndFieldDefSelector to select cols in ftd, label, matcher
- Loading branch information
Showing
8 changed files
with
67 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 15 additions & 7 deletions
22
common/client/src/main/java/zingg/common/client/cols/ZidAndFieldDefSelector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
package zingg.common.client.cols; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import zingg.common.client.FieldDefinition; | ||
import zingg.common.client.util.ColName; | ||
|
||
public class ZidAndFieldDefSelector extends SelectedCols { | ||
public class ZidAndFieldDefSelector extends FieldDefSelectedCols { | ||
|
||
public ZidAndFieldDefSelector(String[] fieldDefs) { | ||
public ZidAndFieldDefSelector(List<? extends FieldDefinition> fieldDefs) { | ||
this(fieldDefs, true, false); | ||
} | ||
|
||
public ZidAndFieldDefSelector(List<? extends FieldDefinition> fieldDefs, boolean includeZid, boolean showConcise) { | ||
List<String> colList = getColList(fieldDefs, showConcise); | ||
|
||
if (includeZid) colList.add(0, ColName.ID_COL); | ||
|
||
colList.add(ColName.SOURCE_COL); | ||
|
||
setCols(colList); | ||
} | ||
|
||
List<String> fieldDefList = Arrays.asList(fieldDefs); | ||
fieldDefList.add(0, ColName.ID_COL); | ||
setCols(fieldDefList); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters